-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Move Layout
and LayoutErr
to core::mem
#71856
Conversation
r? @dtolnay |
☔ The latest upstream changes (presumably #71447) made this pull request unmergeable. Please resolve the merge conflicts. |
r? @Amanieu |
I'm not a big fan of this change since it feels like a lot of churn for something that is already stable. However I can see that @rust-lang/libs any thoughts? |
Also not a huge fan of this. I can see how |
How about we revisit this if a method is ever added in core::mem involving Layout in the signature. For now alloc is the only module containing methods that involve Layout, even if the same type is useful for other purposes. |
This moves
core::alloc::{Layout, LayoutErr}
tocore::mem::{Layout, LayoutError}
and reexport them ascore::alloc::{Layout, LayoutErr}
. Currently it is neither possible to deprecate reexports, nor to document them, however I added the comment so it shows up if rustdoc supports this one day. Also#[doc(no_inline)]
was added to express, that this is a reexport, this is probably the best bet. The alternative would be#[doc(hidden)]
.It's may be an option to also reexport
mem::LayoutError
asalloc::LayoutError
but this is not required.I have another commit in the queue which changes (I hope) all occurrences to the new path, but I want to wait for the CI first. This shouldn't cause any errors or warnings.I pushed the commit. All previous test passed.r? @LukasKalbertodt
closes rust-lang/wg-allocators#59