Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
ctaggart opened this issue Apr 9, 2021 · 1 comment
Closed

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

ctaggart opened this issue Apr 9, 2021 · 1 comment
Labels
CodeGen Issues that relate to code generation

Comments

@ctaggart
Copy link
Contributor

ctaggart commented Apr 9, 2021

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 ctaggart added the CodeGen Issues that relate to code generation label Apr 9, 2021
demoray pushed a commit to demoray/azure-sdk-for-rust that referenced this issue Sep 15, 2023
This addresses members that are directly recursive.  It does not handle
nested recursion.

Partial fix for Azure#225
demoray added a commit that referenced this issue Sep 18, 2023
This addresses members that are directly recursive.  It does not handle
nested recursion.

Partial fix for #225
@cataggar
Copy link
Member

Fixed by #1385.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CodeGen Issues that relate to code generation
Projects
None yet
Development

No branches or pull requests

2 participants