]> git.lizzy.rs Git - rust.git/blobdiff - library/alloc/src/alloc.rs
Auto merge of #96602 - TApplencourt:patch-1, r=Mark-Simulacrum
[rust.git] / library / alloc / src / alloc.rs
index 44389ee47b028270a6c062b01de9a873275b0494..6162b5c6d4c9308fa379f9ab9567e57f22ba02a5 100644 (file)
@@ -326,16 +326,12 @@ unsafe fn exchange_malloc(size: usize, align: usize) -> *mut u8 {
 #[cfg_attr(not(test), lang = "box_free")]
 #[inline]
 #[rustc_const_unstable(feature = "const_box", issue = "92521")]
-#[cfg_attr(not(bootstrap), allow(drop_bounds))] // FIXME remove `~const Drop` and this attr when bumping
 // This signature has to be the same as `Box`, otherwise an ICE will happen.
 // When an additional parameter to `Box` is added (like `A: Allocator`), this has to be added here as
 // well.
 // For example if `Box` is changed to  `struct Box<T: ?Sized, A: Allocator>(Unique<T>, A)`,
 // this function has to be changed to `fn box_free<T: ?Sized, A: Allocator>(Unique<T>, A)` as well.
-pub(crate) const unsafe fn box_free<
-    T: ?Sized,
-    A: ~const Allocator + ~const Drop + ~const Destruct,
->(
+pub(crate) const unsafe fn box_free<T: ?Sized, A: ~const Allocator + ~const Destruct>(
     ptr: Unique<T>,
     alloc: A,
 ) {
@@ -391,7 +387,7 @@ fn rt_error(layout: Layout) -> ! {
 #[cfg(all(not(no_global_oom_handling), test))]
 pub use std::alloc::handle_alloc_error;
 
-#[cfg(all(not(no_global_oom_handling), not(any(target_os = "hermit", test))))]
+#[cfg(all(not(no_global_oom_handling), not(test)))]
 #[doc(hidden)]
 #[allow(unused_attributes)]
 #[unstable(feature = "alloc_internals", issue = "none")]