Skip to content

Commit 0266c13

Browse files
author
Jacob Hughes
committed
Deprecate LayoutErr
1 parent bf0adc3 commit 0266c13

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

library/core/src/alloc/layout.rs

+5
Original file line numberDiff line numberDiff line change
@@ -393,6 +393,11 @@ impl Layout {
393393
}
394394

395395
#[stable(feature = "alloc_layout", since = "1.28.0")]
396+
#[rustc_deprecated(
397+
since = "1.51.0",
398+
reason = "use LayoutError instead",
399+
suggestion = "LayoutError"
400+
)]
396401
pub type LayoutErr = LayoutError;
397402

398403
/// The parameters given to `Layout::from_size_align`

library/core/src/alloc/mod.rs

+9-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,15 @@ mod layout;
88
#[stable(feature = "global_alloc", since = "1.28.0")]
99
pub use self::global::GlobalAlloc;
1010
#[stable(feature = "alloc_layout", since = "1.28.0")]
11-
pub use self::layout::{Layout, LayoutErr};
11+
pub use self::layout::Layout;
12+
#[stable(feature = "alloc_layout", since = "1.28.0")]
13+
#[rustc_deprecated(
14+
since = "1.51.0",
15+
reason = "use LayoutError instead",
16+
suggestion = "LayoutError"
17+
)]
18+
#[allow(deprecated, deprecated_in_future)]
19+
pub use self::layout::LayoutErr;
1220

1321
#[stable(feature = "alloc_layout_error", since = "1.49.0")]
1422
pub use self::layout::LayoutError;

0 commit comments

Comments
 (0)