summary refs log tree commit diff
path: root/library/alloc/src
diff options
context:
space:
mode:
authorlcnr <rust@lcnr.de>2022-03-15 16:56:28 +0100
committerlcnr <rust@lcnr.de>2022-03-30 11:23:58 +0200
commitafbecc0f68c4dcfc4878ba5bcb1ac942544a1bdc (patch)
tree021654b1af9b3df00263b326e1ccc86d98f11e0b /library/alloc/src
parent983c12f7f6a51c10d41c825921e962b0b74e4bca (diff)
downloadrust-afbecc0f68c4dcfc4878ba5bcb1ac942544a1bdc.tar.gz
rust-afbecc0f68c4dcfc4878ba5bcb1ac942544a1bdc.zip
remove now unnecessary lang items
Diffstat (limited to 'library/alloc/src')
-rw-r--r--library/alloc/src/slice.rs4
-rw-r--r--library/alloc/src/str.rs2
2 files changed, 3 insertions, 3 deletions
diff --git a/library/alloc/src/slice.rs b/library/alloc/src/slice.rs
index 111c57e884b..c61e9d85dd1 100644
--- a/library/alloc/src/slice.rs
+++ b/library/alloc/src/slice.rs
@@ -237,7 +237,7 @@ mod hack {
     }
 }
 
-#[lang = "slice_alloc"]
+#[cfg_attr(bootstrap, lang = "slice_alloc")]
 #[cfg(not(test))]
 impl<T> [T] {
     /// Sorts the slice.
@@ -667,7 +667,7 @@ impl<T> [T] {
     }
 }
 
-#[lang = "slice_u8_alloc"]
+#[cfg_attr(bootstrap, lang = "slice_u8_alloc")]
 #[cfg(not(test))]
 impl [u8] {
     /// Returns a vector containing a copy of this slice where each byte
diff --git a/library/alloc/src/str.rs b/library/alloc/src/str.rs
index bf70363258c..a3c17612c3a 100644
--- a/library/alloc/src/str.rs
+++ b/library/alloc/src/str.rs
@@ -235,7 +235,7 @@ impl ToOwned for str {
 }
 
 /// Methods for string slices.
-#[lang = "str_alloc"]
+#[cfg_attr(bootstrap, lang = "str_alloc")]
 #[cfg(not(test))]
 impl str {
     /// Converts a `Box<str>` into a `Box<[u8]>` without copying or allocating.