@@ -237,7 +237,6 @@ mod hack {
237237 }
238238}
239239
240- #[ cfg_attr( bootstrap, lang = "slice_alloc" ) ]
241240#[ cfg( not( test) ) ]
242241impl < T > [ T ] {
243242 /// Sorts the slice.
@@ -267,7 +266,7 @@ impl<T> [T] {
267266 /// assert!(v == [-5, -3, 1, 2, 4]);
268267 /// ```
269268 #[ cfg( not( no_global_oom_handling) ) ]
270- #[ cfg_attr ( not ( bootstrap ) , rustc_allow_incoherent_impl) ]
269+ #[ rustc_allow_incoherent_impl]
271270 #[ stable( feature = "rust1" , since = "1.0.0" ) ]
272271 #[ inline]
273272 pub fn sort ( & mut self )
@@ -323,7 +322,7 @@ impl<T> [T] {
323322 /// assert!(v == [5, 4, 3, 2, 1]);
324323 /// ```
325324 #[ cfg( not( no_global_oom_handling) ) ]
326- #[ cfg_attr ( not ( bootstrap ) , rustc_allow_incoherent_impl) ]
325+ #[ rustc_allow_incoherent_impl]
327326 #[ stable( feature = "rust1" , since = "1.0.0" ) ]
328327 #[ inline]
329328 pub fn sort_by < F > ( & mut self , mut compare : F )
@@ -365,7 +364,7 @@ impl<T> [T] {
365364 /// assert!(v == [1, 2, -3, 4, -5]);
366365 /// ```
367366 #[ cfg( not( no_global_oom_handling) ) ]
368- #[ cfg_attr ( not ( bootstrap ) , rustc_allow_incoherent_impl) ]
367+ #[ rustc_allow_incoherent_impl]
369368 #[ stable( feature = "slice_sort_by_key" , since = "1.7.0" ) ]
370369 #[ inline]
371370 pub fn sort_by_key < K , F > ( & mut self , mut f : F )
@@ -412,7 +411,7 @@ impl<T> [T] {
412411 ///
413412 /// [pdqsort]: https://github.com/orlp/pdqsort
414413 #[ cfg( not( no_global_oom_handling) ) ]
415- #[ cfg_attr ( not ( bootstrap ) , rustc_allow_incoherent_impl) ]
414+ #[ rustc_allow_incoherent_impl]
416415 #[ stable( feature = "slice_sort_by_cached_key" , since = "1.34.0" ) ]
417416 #[ inline]
418417 pub fn sort_by_cached_key < K , F > ( & mut self , f : F )
@@ -471,7 +470,7 @@ impl<T> [T] {
471470 /// // Here, `s` and `x` can be modified independently.
472471 /// ```
473472 #[ cfg( not( no_global_oom_handling) ) ]
474- #[ cfg_attr ( not ( bootstrap ) , rustc_allow_incoherent_impl) ]
473+ #[ rustc_allow_incoherent_impl]
475474 #[ rustc_conversion_suggestion]
476475 #[ stable( feature = "rust1" , since = "1.0.0" ) ]
477476 #[ inline]
@@ -496,7 +495,7 @@ impl<T> [T] {
496495 /// // Here, `s` and `x` can be modified independently.
497496 /// ```
498497 #[ cfg( not( no_global_oom_handling) ) ]
499- #[ cfg_attr ( not ( bootstrap ) , rustc_allow_incoherent_impl) ]
498+ #[ rustc_allow_incoherent_impl]
500499 #[ inline]
501500 #[ unstable( feature = "allocator_api" , issue = "32838" ) ]
502501 pub fn to_vec_in < A : Allocator > ( & self , alloc : A ) -> Vec < T , A >
@@ -521,7 +520,7 @@ impl<T> [T] {
521520 ///
522521 /// assert_eq!(x, vec![10, 40, 30]);
523522 /// ```
524- #[ cfg_attr ( not ( bootstrap ) , rustc_allow_incoherent_impl) ]
523+ #[ rustc_allow_incoherent_impl]
525524 #[ stable( feature = "rust1" , since = "1.0.0" ) ]
526525 #[ inline]
527526 pub fn into_vec < A : Allocator > ( self : Box < Self , A > ) -> Vec < T , A > {
@@ -549,7 +548,7 @@ impl<T> [T] {
549548 /// // this will panic at runtime
550549 /// b"0123456789abcdef".repeat(usize::MAX);
551550 /// ```
552- #[ cfg_attr ( not ( bootstrap ) , rustc_allow_incoherent_impl) ]
551+ #[ rustc_allow_incoherent_impl]
553552 #[ cfg( not( no_global_oom_handling) ) ]
554553 #[ stable( feature = "repeat_generic_slice" , since = "1.40.0" ) ]
555554 pub fn repeat ( & self , n : usize ) -> Vec < T >
@@ -618,7 +617,7 @@ impl<T> [T] {
618617 /// assert_eq!(["hello", "world"].concat(), "helloworld");
619618 /// assert_eq!([[1, 2], [3, 4]].concat(), [1, 2, 3, 4]);
620619 /// ```
621- #[ cfg_attr ( not ( bootstrap ) , rustc_allow_incoherent_impl) ]
620+ #[ rustc_allow_incoherent_impl]
622621 #[ stable( feature = "rust1" , since = "1.0.0" ) ]
623622 pub fn concat < Item : ?Sized > ( & self ) -> <Self as Concat < Item > >:: Output
624623 where
@@ -637,7 +636,7 @@ impl<T> [T] {
637636 /// assert_eq!([[1, 2], [3, 4]].join(&0), [1, 2, 0, 3, 4]);
638637 /// assert_eq!([[1, 2], [3, 4]].join(&[0, 0][..]), [1, 2, 0, 0, 3, 4]);
639638 /// ```
640- #[ cfg_attr ( not ( bootstrap ) , rustc_allow_incoherent_impl) ]
639+ #[ rustc_allow_incoherent_impl]
641640 #[ stable( feature = "rename_connect_to_join" , since = "1.3.0" ) ]
642641 pub fn join < Separator > ( & self , sep : Separator ) -> <Self as Join < Separator > >:: Output
643642 where
@@ -656,7 +655,7 @@ impl<T> [T] {
656655 /// assert_eq!(["hello", "world"].connect(" "), "hello world");
657656 /// assert_eq!([[1, 2], [3, 4]].connect(&0), [1, 2, 0, 3, 4]);
658657 /// ```
659- #[ cfg_attr ( not ( bootstrap ) , rustc_allow_incoherent_impl) ]
658+ #[ rustc_allow_incoherent_impl]
660659 #[ stable( feature = "rust1" , since = "1.0.0" ) ]
661660 #[ rustc_deprecated( since = "1.3.0" , reason = "renamed to join" ) ]
662661 pub fn connect < Separator > ( & self , sep : Separator ) -> <Self as Join < Separator > >:: Output
@@ -667,7 +666,6 @@ impl<T> [T] {
667666 }
668667}
669668
670- #[ cfg_attr( bootstrap, lang = "slice_u8_alloc" ) ]
671669#[ cfg( not( test) ) ]
672670impl [ u8 ] {
673671 /// Returns a vector containing a copy of this slice where each byte
@@ -680,7 +678,7 @@ impl [u8] {
680678 ///
681679 /// [`make_ascii_uppercase`]: slice::make_ascii_uppercase
682680 #[ cfg( not( no_global_oom_handling) ) ]
683- #[ cfg_attr ( not ( bootstrap ) , rustc_allow_incoherent_impl) ]
681+ #[ rustc_allow_incoherent_impl]
684682 #[ must_use = "this returns the uppercase bytes as a new Vec, \
685683 without modifying the original"]
686684 #[ stable( feature = "ascii_methods_on_intrinsics" , since = "1.23.0" ) ]
@@ -701,7 +699,7 @@ impl [u8] {
701699 ///
702700 /// [`make_ascii_lowercase`]: slice::make_ascii_lowercase
703701 #[ cfg( not( no_global_oom_handling) ) ]
704- #[ cfg_attr ( not ( bootstrap ) , rustc_allow_incoherent_impl) ]
702+ #[ rustc_allow_incoherent_impl]
705703 #[ must_use = "this returns the lowercase bytes as a new Vec, \
706704 without modifying the original"]
707705 #[ stable( feature = "ascii_methods_on_intrinsics" , since = "1.23.0" ) ]
0 commit comments