-
Notifications
You must be signed in to change notification settings - Fork 9
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
#59
Comments
@rust-lang/libs Any thoughts on this, since it’s about stable APIs? |
Adding those two types to Regarding renaming to
|
I think you meant When deprecating This works fine: #[stable(feature = "alloc_layout", since = "1.28.0")]
#[rustc_deprecated(since = "1.45.0", reason = "Use `core::mem::Layout` instead")]
pub use crate::mem::Layout;
#[stable(feature = "alloc_layout", since = "1.28.0")]
#[rustc_deprecated(since = "1.45.0", reason = "Use `core::mem::LayoutError` instead")]
pub use crate::mem::LayoutError as LayoutErr; At least it compiles. I tried to build the docs but |
Oh, yes, sorry. Fixed. |
Which |
Neither |
Layout
is basically a wrapper aroundmem::size_of
andmem::align_of
(batteries included) and should live in the same module. For compatibility,Layout
(and its Error) have to be reexported tocore::alloc
.NB: As the discussion just came up (#57), it would also be possible to rename
LayoutErr
toLayoutError
incore::mem
and reexport it incore::alloc
asLayoutErr
.The text was updated successfully, but these errors were encountered: