-
Notifications
You must be signed in to change notification settings - Fork 5
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
Change struct representation to transparent #13
Conversation
dynosaur/tests/pass/basic-mut.stdout
Outdated
pub fn boxed(value: impl MyTrait) | ||
-> Box<DynMyTrait<'dynosaur_struct>> { | ||
Self::new(Box::new(value)) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similar to above
dynosaur/tests/pass/basic-mut.stdout
Outdated
} | ||
pub fn new(value: Box<impl MyTrait>) | ||
-> Box<DynMyTrait<'dynosaur_struct>> { | ||
let value: Box<dyn ErasedMyTrait> = value; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see how this could have compiled since it's implicitly Box<dyn ErasedMyTrait + 'static>
. It would require that the parameter was Box<impl MyTrait + 'static>
.
59f90cb
to
d43be76
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved but if you address my last comment in this PR, ideally I'd like to take another look.
d43be76
to
70f18a0
Compare
r? @tmandry