about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJules Bertholet <jules.bertholet@gmail.com>2023-04-29 18:10:10 -0400
committerGitHub <noreply@github.com>2023-04-29 18:10:10 -0400
commit18d2c60975c356d36ce6138130b5e0fdc79b1424 (patch)
tree1280490a85af1a5209b3b9768f9b76f2e9f73944
parent075ee26b6884514a65b0822b8745a6f5f35e8720 (diff)
downloadrust-18d2c60975c356d36ce6138130b5e0fdc79b1424.tar.gz
rust-18d2c60975c356d36ce6138130b5e0fdc79b1424.zip
`cfg`-gate `BoxFromSlice` trait
Co-authored-by: David Tolnay <dtolnay@gmail.com>
-rw-r--r--library/alloc/src/boxed.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/library/alloc/src/boxed.rs b/library/alloc/src/boxed.rs
index 2a26661cab4..1768687e8cd 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<T> {
     fn from_slice(slice: &[T]) -> Self;
 }