Skip to content

Commit

Permalink
Deprecate LayoutErr
Browse files Browse the repository at this point in the history
  • Loading branch information
Jacob Hughes committed Oct 8, 2020
1 parent bf0adc3 commit 0266c13
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
5 changes: 5 additions & 0 deletions library/core/src/alloc/layout.rs
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,11 @@ impl Layout {
}

#[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`
Expand Down
10 changes: 9 additions & 1 deletion library/core/src/alloc/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,15 @@ mod layout;
#[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;
Expand Down

0 comments on commit 0266c13

Please sign in to comment.