-
Notifications
You must be signed in to change notification settings - Fork 49
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
feat: allow deriving Trace without Drop/Finalize #116
base: master
Are you sure you want to change the base?
Conversation
Custom Drop implementation still can't be written, because generated TriviallyDrop implementation tries to destruct value, which is only possible when there is no user defined Drop impl Empty Finalize impl generated too, because it will never be called Signed-off-by: Yaroslav Bolyukin <[email protected]>
cc @kneecaw |
cc @mystor |
444f54e
to
456c8e9
Compare
Signed-off-by: Yaroslav Bolyukin <[email protected]>
456c8e9
to
fe4fea0
Compare
Didn't meant to bother you with broken code, accidentally pushed, and then was busy, sorry. |
Some manual Trace/Finalize implementations can be replaced with derives with Manishearth/rust-gc#116 getting merged Signed-off-by: Yaroslav Bolyukin <[email protected]>
Some manual Trace/Finalize implementations can be replaced with derives with Manishearth/rust-gc#116 getting merged Signed-off-by: Yaroslav Bolyukin <[email protected]>
Signed-off-by: Yaroslav Bolyukin <[email protected]>
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.
Sorry about the delay! This looks good, happy to merge it in but would like some additional comments.
Ideally, it would be nice if this could be documented somewhere too.
#drop_impl | ||
} | ||
} else { | ||
s.bind_with(|_| BindStyle::Move); |
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.
Can we add some comments here as to why this branch is safe?
To allow structs with generated Trace impl to be destructured