Conversation
f555762 to
713dbed
Compare
jswrenn
left a comment
There was a problem hiding this comment.
I like the general approach!
src/lib.rs
Outdated
| __ZEROCOPY_INTERNAL_USE_ONLY_NIGHTLY_FEATURES_IN_TESTS, | ||
| feature(layout_for_ptr, strict_provenance, coverage_attribute) | ||
| )] | ||
| #![cfg_attr(feature = "unstable-transmute-vec", feature(vec_into_raw_parts))] |
There was a problem hiding this comment.
We should attempt to move the trait impl for Vec into the macro, so that feature(vec_into_raw_parts) is something our customers write instead of us. This makes it harder for customers to accidentally and unkowingly depend on a nightly feature (e.g., because another dependency enabled this cargo feature).
There was a problem hiding this comment.
Any ideas for how to do that given that the macro delegates to a trait impl and doesn't have access to the name of the container type being used?
There was a problem hiding this comment.
Ugly but bear with me: Move the trait and impl to inside the macro.
There was a problem hiding this comment.
Discussed offline. Going to just remove Vec support for now.
27dcf55 to
d54acba
Compare
d54acba to
c51c96a
Compare
This is a draft implementation of #1735