]> git.lizzy.rs Git - rust.git/commitdiff
Deprecate LayoutErr
authorJacob Hughes <j@jacobhughes.me>
Mon, 28 Sep 2020 23:43:39 +0000 (19:43 -0400)
committerJacob Hughes <j@jacobhughes.me>
Thu, 8 Oct 2020 05:19:21 +0000 (01:19 -0400)
library/core/src/alloc/layout.rs
library/core/src/alloc/mod.rs

index e338baea6459ae61dcee5c3dde29b3f32cc566e5..87f0fc4abe2f835cc4b4c4a346e4726e756cea28 100644 (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`
index 6635e4229e0468a9134488ae73eb910ce160c393..bd928423fecf376da05e8dcf8035cd152509daaf 100644 (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;