]> git.lizzy.rs Git - rust.git/blobdiff - library/core/src/alloc/mod.rs
Rollup merge of #83444 - Mark-Simulacrum:bootstrap-beta, r=pietroalbini
[rust.git] / library / core / src / alloc / mod.rs
index 045eb58d0135a6c7f0df4ca315b525cbc2e50fc8..06a761531b6763b97196046daf9c9323b1fe20fb 100644 (file)
 pub use self::layout::Layout;
 #[stable(feature = "alloc_layout", since = "1.28.0")]
 #[rustc_deprecated(
-    since = "1.51.0",
+    since = "1.52.0",
     reason = "Name does not follow std convention, use LayoutError",
     suggestion = "LayoutError"
 )]
 #[allow(deprecated, deprecated_in_future)]
 pub use self::layout::LayoutErr;
 
-#[stable(feature = "alloc_layout_error", since = "1.49.0")]
+#[stable(feature = "alloc_layout_error", since = "1.50.0")]
 pub use self::layout::LayoutError;
 
 use crate::fmt;
@@ -342,7 +342,10 @@ unsafe fn shrink(
     ///
     /// The returned adaptor also implements `Allocator` and will simply borrow this.
     #[inline(always)]
-    fn by_ref(&self) -> &Self {
+    fn by_ref(&self) -> &Self
+    where
+        Self: Sized,
+    {
         self
     }
 }