ctaggart / autorust

MIT License
12 stars 4 forks source link

Automatically box use of struct as a field in that struct #85

Closed rylev closed 3 years ago

rylev commented 3 years ago

As hinted in #84, we should (when possible) automatically box types when they are used as the type of their own field.

For example, it should be possible to detect the following situation:

struct Foo {
   bar: Bar,
   foo: Foo
}

and turn it into:

struct Foo {
   bar: Bar,
   foo: Box<Foo>
}
ctaggart commented 3 years ago

moved to https://github.com/Azure/azure-sdk-for-rust/issues/225