about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJacob Hughes <j@jacobhughes.me>2020-09-28 19:43:39 -0400
committerJacob Hughes <j@jacobhughes.me>2020-10-08 01:19:21 -0400
commit0266c134a724626506a256da58a982ea8a6e3ec8 (patch)
tree731e596d2161a0d801dd1f08d636c6a1bdc20093
parentbf0adc3c36c255fd4dab690f9bdc369daf3e8825 (diff)
downloadrust-0266c134a724626506a256da58a982ea8a6e3ec8.tar.gz
rust-0266c134a724626506a256da58a982ea8a6e3ec8.zip
Deprecate LayoutErr
-rw-r--r--library/core/src/alloc/layout.rs5
-rw-r--r--library/core/src/alloc/mod.rs10
2 files changed, 14 insertions, 1 deletions
diff --git a/library/core/src/alloc/layout.rs b/library/core/src/alloc/layout.rs
index e338baea645..87f0fc4abe2 100644
--- a/library/core/src/alloc/layout.rs
+++ b/library/core/src/alloc/layout.rs
@@ -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`
diff --git a/library/core/src/alloc/mod.rs b/library/core/src/alloc/mod.rs
index 6635e4229e0..bd928423fec 100644
--- a/library/core/src/alloc/mod.rs
+++ b/library/core/src/alloc/mod.rs
@@ -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;