diff --git a/library/alloc/src/boxed.rs b/library/alloc/src/boxed.rs index 2a26661cab4a7..1768687e8cd02 100644 --- a/library/alloc/src/boxed.rs +++ b/library/alloc/src/boxed.rs @@ -1456,6 +1456,7 @@ where } /// Specialization trait used for `From<&[T]>`. +#[cfg(not(no_global_oom_handling))] trait BoxFromSlice { fn from_slice(slice: &[T]) -> Self; }