From afbecc0f68c4dcfc4878ba5bcb1ac942544a1bdc Mon Sep 17 00:00:00 2001 From: lcnr Date: Tue, 15 Mar 2022 16:56:28 +0100 Subject: remove now unnecessary lang items --- library/alloc/src/slice.rs | 4 ++-- library/alloc/src/str.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'library/alloc/src') 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] { /// Sorts the slice. @@ -667,7 +667,7 @@ impl [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` into a `Box<[u8]>` without copying or allocating. -- cgit 1.4.1-3-g733a5