Deprecate LayoutErr

This commit is contained in:
Jacob Hughes 2020-09-28 19:43:39 -04:00
parent bf0adc3c36
commit 0266c134a7
2 changed files with 14 additions and 1 deletions

View File

@ -393,6 +393,11 @@ pub fn array<T>(n: usize) -> Result<Self, LayoutError> {
}
#[stable(feature = "alloc_layout", since = "1.28.0")]
#[rustc_deprecated(
since = "1.51.0",
reason = "use LayoutError instead",
suggestion = "LayoutError"
)]
pub type LayoutErr = LayoutError;
/// The parameters given to `Layout::from_size_align`

View File

@ -8,7 +8,15 @@
#[stable(feature = "global_alloc", since = "1.28.0")]
pub use self::global::GlobalAlloc;
#[stable(feature = "alloc_layout", since = "1.28.0")]
pub use self::layout::{Layout, LayoutErr};
pub use self::layout::Layout;
#[stable(feature = "alloc_layout", since = "1.28.0")]
#[rustc_deprecated(
since = "1.51.0",
reason = "use LayoutError instead",
suggestion = "LayoutError"
)]
#[allow(deprecated, deprecated_in_future)]
pub use self::layout::LayoutErr;
#[stable(feature = "alloc_layout_error", since = "1.49.0")]
pub use self::layout::LayoutError;