]> git.lizzy.rs Git - rust.git/blobdiff - library/alloc/src/boxed.rs
Rollup merge of #92559 - durin42:llvm-14-attributemask, r=nikic
[rust.git] / library / alloc / src / boxed.rs
index 59e4ebb181fe5a44f4e9543c0919eb423965dbff..aa7344ba405a988c31598701bcf7759940ea1e2f 100644 (file)
@@ -346,7 +346,7 @@ impl<T, A: Allocator> Box<T, A> {
     /// ```
     #[cfg(not(no_global_oom_handling))]
     #[unstable(feature = "allocator_api", issue = "32838")]
-    #[rustc_const_unstable(feature = "const_box", issue = "none")]
+    #[rustc_const_unstable(feature = "const_box", issue = "92521")]
     #[must_use]
     #[inline]
     pub const fn new_in(x: T, alloc: A) -> Self
@@ -376,7 +376,7 @@ pub const fn new_in(x: T, alloc: A) -> Self
     /// # Ok::<(), std::alloc::AllocError>(())
     /// ```
     #[unstable(feature = "allocator_api", issue = "32838")]
-    #[rustc_const_unstable(feature = "const_box", issue = "none")]
+    #[rustc_const_unstable(feature = "const_box", issue = "92521")]
     #[inline]
     pub const fn try_new_in(x: T, alloc: A) -> Result<Self, AllocError>
     where
@@ -411,7 +411,7 @@ pub const fn try_new_in(x: T, alloc: A) -> Result<Self, AllocError>
     /// assert_eq!(*five, 5)
     /// ```
     #[unstable(feature = "allocator_api", issue = "32838")]
-    #[rustc_const_unstable(feature = "const_box", issue = "none")]
+    #[rustc_const_unstable(feature = "const_box", issue = "92521")]
     #[cfg(not(no_global_oom_handling))]
     #[must_use]
     // #[unstable(feature = "new_uninit", issue = "63291")]
@@ -452,7 +452,7 @@ pub const fn new_uninit_in(alloc: A) -> Box<mem::MaybeUninit<T>, A>
     /// ```
     #[unstable(feature = "allocator_api", issue = "32838")]
     // #[unstable(feature = "new_uninit", issue = "63291")]
-    #[rustc_const_unstable(feature = "const_box", issue = "none")]
+    #[rustc_const_unstable(feature = "const_box", issue = "92521")]
     pub const fn try_new_uninit_in(alloc: A) -> Result<Box<mem::MaybeUninit<T>, A>, AllocError>
     where
         A: ~const Allocator + ~const Drop,
@@ -483,7 +483,7 @@ pub const fn try_new_uninit_in(alloc: A) -> Result<Box<mem::MaybeUninit<T>, A>,
     ///
     /// [zeroed]: mem::MaybeUninit::zeroed
     #[unstable(feature = "allocator_api", issue = "32838")]
-    #[rustc_const_unstable(feature = "const_box", issue = "none")]
+    #[rustc_const_unstable(feature = "const_box", issue = "92521")]
     #[cfg(not(no_global_oom_handling))]
     // #[unstable(feature = "new_uninit", issue = "63291")]
     #[must_use]
@@ -524,7 +524,7 @@ pub const fn new_zeroed_in(alloc: A) -> Box<mem::MaybeUninit<T>, A>
     /// [zeroed]: mem::MaybeUninit::zeroed
     #[unstable(feature = "allocator_api", issue = "32838")]
     // #[unstable(feature = "new_uninit", issue = "63291")]
-    #[rustc_const_unstable(feature = "const_box", issue = "none")]
+    #[rustc_const_unstable(feature = "const_box", issue = "92521")]
     pub const fn try_new_zeroed_in(alloc: A) -> Result<Box<mem::MaybeUninit<T>, A>, AllocError>
     where
         A: ~const Allocator + ~const Drop,
@@ -538,7 +538,7 @@ pub const fn try_new_zeroed_in(alloc: A) -> Result<Box<mem::MaybeUninit<T>, A>,
     /// `x` will be pinned in memory and unable to be moved.
     #[cfg(not(no_global_oom_handling))]
     #[unstable(feature = "allocator_api", issue = "32838")]
-    #[rustc_const_unstable(feature = "const_box", issue = "none")]
+    #[rustc_const_unstable(feature = "const_box", issue = "92521")]
     #[must_use]
     #[inline(always)]
     pub const fn pin_in(x: T, alloc: A) -> Pin<Self>
@@ -552,7 +552,7 @@ pub const fn pin_in(x: T, alloc: A) -> Pin<Self>
     ///
     /// This conversion does not allocate on the heap and happens in place.
     #[unstable(feature = "box_into_boxed_slice", issue = "71582")]
-    #[rustc_const_unstable(feature = "const_box", issue = "none")]
+    #[rustc_const_unstable(feature = "const_box", issue = "92521")]
     pub const fn into_boxed_slice(boxed: Self) -> Box<[T], A> {
         let (raw, alloc) = Box::into_raw_with_allocator(boxed);
         unsafe { Box::from_raw_in(raw as *mut [T; 1], alloc) }
@@ -570,7 +570,7 @@ pub const fn into_boxed_slice(boxed: Self) -> Box<[T], A> {
     /// assert_eq!(Box::into_inner(c), 5);
     /// ```
     #[unstable(feature = "box_into_inner", issue = "80437")]
-    #[rustc_const_unstable(feature = "const_box", issue = "none")]
+    #[rustc_const_unstable(feature = "const_box", issue = "92521")]
     #[inline]
     pub const fn into_inner(boxed: Self) -> T
     where
@@ -789,7 +789,7 @@ impl<T, A: Allocator> Box<mem::MaybeUninit<T>, A> {
     /// assert_eq!(*five, 5)
     /// ```
     #[unstable(feature = "new_uninit", issue = "63291")]
-    #[rustc_const_unstable(feature = "const_box", issue = "none")]
+    #[rustc_const_unstable(feature = "const_box", issue = "92521")]
     #[inline]
     pub const unsafe fn assume_init(self) -> Box<T, A> {
         let (raw, alloc) = Box::into_raw_with_allocator(self);
@@ -824,7 +824,7 @@ impl<T, A: Allocator> Box<mem::MaybeUninit<T>, A> {
     /// }
     /// ```
     #[unstable(feature = "new_uninit", issue = "63291")]
-    #[rustc_const_unstable(feature = "const_box", issue = "none")]
+    #[rustc_const_unstable(feature = "const_box", issue = "92521")]
     #[inline]
     pub const fn write(mut boxed: Self, value: T) -> Box<T, A> {
         unsafe {
@@ -971,7 +971,7 @@ impl<T: ?Sized, A: Allocator> Box<T, A> {
     /// [memory layout]: self#memory-layout
     /// [`Layout`]: crate::Layout
     #[unstable(feature = "allocator_api", issue = "32838")]
-    #[rustc_const_unstable(feature = "const_box", issue = "none")]
+    #[rustc_const_unstable(feature = "const_box", issue = "92521")]
     #[inline]
     pub const unsafe fn from_raw_in(raw: *mut T, alloc: A) -> Self {
         Box(unsafe { Unique::new_unchecked(raw) }, alloc)
@@ -1069,7 +1069,7 @@ pub fn into_raw(b: Self) -> *mut T {
     ///
     /// [memory layout]: self#memory-layout
     #[unstable(feature = "allocator_api", issue = "32838")]
-    #[rustc_const_unstable(feature = "const_box", issue = "none")]
+    #[rustc_const_unstable(feature = "const_box", issue = "92521")]
     #[inline]
     pub const fn into_raw_with_allocator(b: Self) -> (*mut T, A) {
         let (leaked, alloc) = Box::into_unique(b);
@@ -1081,7 +1081,7 @@ pub const fn into_raw_with_allocator(b: Self) -> (*mut T, A) {
         issue = "none",
         reason = "use `Box::leak(b).into()` or `Unique::from(Box::leak(b))` instead"
     )]
-    #[rustc_const_unstable(feature = "const_box", issue = "none")]
+    #[rustc_const_unstable(feature = "const_box", issue = "92521")]
     #[inline]
     #[doc(hidden)]
     pub const fn into_unique(b: Self) -> (Unique<T>, A) {
@@ -1100,7 +1100,7 @@ pub const fn into_unique(b: Self) -> (Unique<T>, A) {
     /// to call it as `Box::allocator(&b)` instead of `b.allocator()`. This
     /// is so that there is no conflict with a method on the inner type.
     #[unstable(feature = "allocator_api", issue = "32838")]
-    #[rustc_const_unstable(feature = "const_box", issue = "none")]
+    #[rustc_const_unstable(feature = "const_box", issue = "92521")]
     #[inline]
     pub const fn allocator(b: &Self) -> &A {
         &b.1
@@ -1142,7 +1142,7 @@ pub const fn allocator(b: &Self) -> &A {
     /// assert_eq!(*static_ref, [4, 2, 3]);
     /// ```
     #[stable(feature = "box_leak", since = "1.26.0")]
-    #[rustc_const_unstable(feature = "const_box", issue = "none")]
+    #[rustc_const_unstable(feature = "const_box", issue = "92521")]
     #[inline]
     pub const fn leak<'a>(b: Self) -> &'a mut T
     where
@@ -1157,7 +1157,7 @@ pub const fn leak<'a>(b: Self) -> &'a mut T
     ///
     /// This is also available via [`From`].
     #[unstable(feature = "box_into_pin", issue = "62370")]
-    #[rustc_const_unstable(feature = "const_box", issue = "none")]
+    #[rustc_const_unstable(feature = "const_box", issue = "92521")]
     pub const fn into_pin(boxed: Self) -> Pin<Self>
     where
         A: 'static,
@@ -1170,7 +1170,7 @@ pub const fn into_pin(boxed: Self) -> Pin<Self>
 }
 
 #[stable(feature = "rust1", since = "1.0.0")]
-#[rustc_const_unstable(feature = "const_box", issue = "none")]
+#[rustc_const_unstable(feature = "const_box", issue = "92521")]
 unsafe impl<#[may_dangle] T: ?Sized, A: Allocator> const Drop for Box<T, A> {
     fn drop(&mut self) {
         // FIXME: Do nothing, drop is currently performed by compiler.
@@ -1381,7 +1381,7 @@ fn from(t: T) -> Self {
 }
 
 #[stable(feature = "pin", since = "1.33.0")]
-#[rustc_const_unstable(feature = "const_box", issue = "none")]
+#[rustc_const_unstable(feature = "const_box", issue = "92521")]
 impl<T: ?Sized, A: Allocator> const From<Box<T, A>> for Pin<Box<T, A>>
 where
     A: 'static,
@@ -1761,7 +1761,7 @@ fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
 }
 
 #[stable(feature = "rust1", since = "1.0.0")]
-#[rustc_const_unstable(feature = "const_box", issue = "none")]
+#[rustc_const_unstable(feature = "const_box", issue = "92521")]
 impl<T: ?Sized, A: Allocator> const Deref for Box<T, A> {
     type Target = T;
 
@@ -1771,7 +1771,7 @@ fn deref(&self) -> &T {
 }
 
 #[stable(feature = "rust1", since = "1.0.0")]
-#[rustc_const_unstable(feature = "const_box", issue = "none")]
+#[rustc_const_unstable(feature = "const_box", issue = "92521")]
 impl<T: ?Sized, A: Allocator> const DerefMut for Box<T, A> {
     fn deref_mut(&mut self) -> &mut T {
         &mut **self
@@ -1951,7 +1951,7 @@ fn as_mut(&mut self) -> &mut T {
  *  could have a method to project a Pin<T> from it.
  */
 #[stable(feature = "pin", since = "1.33.0")]
-#[rustc_const_unstable(feature = "const_box", issue = "none")]
+#[rustc_const_unstable(feature = "const_box", issue = "92521")]
 impl<T: ?Sized, A: Allocator> const Unpin for Box<T, A> where A: 'static {}
 
 #[unstable(feature = "generator_trait", issue = "43122")]