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

Implement From<Box<T>> for Gc<T> #160

Merged
merged 5 commits into from
Dec 22, 2022
Merged

Conversation

andersk
Copy link
Collaborator

@andersk andersk commented Dec 20, 2022

This is especially useful on nightly, where it works for unsized trait objects.

(Unsized slices cannot be supported with the current design, as there’s no conversion from [T] to dyn Trace: #2 (comment).)

Fixes #72.

Copy link
Owner

@Manishearth Manishearth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mostly looks good but i would like some doc and safety comments (even for internal functions)

gc/src/gc.rs Show resolved Hide resolved
gc/src/gc.rs Show resolved Hide resolved
gc/src/gc.rs Show resolved Hide resolved
gc/src/lib.rs Show resolved Hide resolved
Signed-off-by: Anders Kaseorg <[email protected]>
Signed-off-by: Anders Kaseorg <[email protected]>
This is especially useful on nightly, where it works for unsized trait
objects.

Signed-off-by: Anders Kaseorg <[email protected]>
@andersk
Copy link
Collaborator Author

andersk commented Dec 22, 2022

Added documentation and comments; how’s this?

(I note that clippy::pedantic has been complaining about missing safety documentation for unsafe trait Trace, which we should probably add at some point.)

@Manishearth Manishearth merged commit a243a10 into Manishearth:master Dec 22, 2022
@Manishearth
Copy link
Owner

Thanks!

@andersk andersk deleted the from-box branch December 22, 2022 01:32
@andersk andersk mentioned this pull request Dec 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support for trait objects
2 participants