This repository was archived by the owner on May 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 9 files changed +3
-44
lines changed
rustc_trait_selection/src Expand file tree Collapse file tree 9 files changed +3
-44
lines changed Original file line number Diff line number Diff line change 2121
2222// tidy-alphabetical-start
2323#![ allow( internal_features) ]
24- #![ cfg_attr( bootstrap, feature( extract_if) ) ]
2524#![ cfg_attr( doc, recursion_limit = "256" ) ] // FIXME(nnethercote): will be removed by #124141
2625#![ doc( html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/" ) ]
2726#![ doc( rust_logo) ]
Original file line number Diff line number Diff line change 11// tidy-alphabetical-start
22#![ allow( internal_features) ]
3- #![ cfg_attr( bootstrap, feature( extract_if) ) ]
43#![ cfg_attr( doc, recursion_limit = "256" ) ] // FIXME(nnethercote): will be removed by #124141
54#![ doc( html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/" ) ]
65#![ doc( rust_logo) ]
Original file line number Diff line number Diff line change 2929#![ allow( rustc:: diagnostic_outside_of_impl) ]
3030#![ allow( rustc:: potential_query_instability) ]
3131#![ allow( rustc:: untranslatable_diagnostic) ]
32- #![ cfg_attr( bootstrap, feature( extract_if) ) ]
3332#![ cfg_attr( doc, recursion_limit = "256" ) ] // FIXME(nnethercote): will be removed by #124141
3433#![ doc( html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/" ) ]
3534#![ doc( rust_logo) ]
Original file line number Diff line number Diff line change 1010#![ allow( internal_features) ]
1111#![ allow( rustc:: diagnostic_outside_of_impl) ]
1212#![ allow( rustc:: untranslatable_diagnostic) ]
13- #![ cfg_attr( bootstrap, feature( extract_if) ) ]
1413#![ doc( html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/" ) ]
1514#![ doc( rust_logo) ]
1615#![ feature( assert_matches) ]
Original file line number Diff line number Diff line change 33// tidy-alphabetical-start
44#![ allow( internal_features) ]
55#![ allow( rustc:: internal) ]
6- #![ cfg_attr( bootstrap, feature( ptr_sub_ptr) ) ]
76#![ cfg_attr( test, feature( test) ) ]
87#![ doc(
98 html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/" ,
Original file line number Diff line number Diff line change @@ -280,27 +280,13 @@ impl<'a> MemDecoder<'a> {
280280 #[ inline]
281281 pub fn len ( & self ) -> usize {
282282 // SAFETY: This recovers the length of the original slice, only using members we never modify.
283- #[ cfg( bootstrap) ]
284- unsafe {
285- return self . end . sub_ptr ( self . start ) ;
286- }
287- #[ cfg( not( bootstrap) ) ]
288- unsafe {
289- self . end . offset_from_unsigned ( self . start )
290- }
283+ unsafe { self . end . offset_from_unsigned ( self . start ) }
291284 }
292285
293286 #[ inline]
294287 pub fn remaining ( & self ) -> usize {
295288 // SAFETY: This type guarantees current <= end.
296- #[ cfg( bootstrap) ]
297- unsafe {
298- return self . end . sub_ptr ( self . current ) ;
299- }
300- #[ cfg( not( bootstrap) ) ]
301- unsafe {
302- self . end . offset_from_unsigned ( self . current )
303- }
289+ unsafe { self . end . offset_from_unsigned ( self . current ) }
304290 }
305291
306292 #[ cold]
@@ -414,14 +400,7 @@ impl<'a> Decoder for MemDecoder<'a> {
414400 #[ inline]
415401 fn position ( & self ) -> usize {
416402 // SAFETY: This type guarantees start <= current
417- #[ cfg( bootstrap) ]
418- unsafe {
419- return self . current . sub_ptr ( self . start ) ;
420- }
421- #[ cfg( not( bootstrap) ) ]
422- unsafe {
423- self . current . offset_from_unsigned ( self . start )
424- }
403+ unsafe { self . current . offset_from_unsigned ( self . start ) }
425404 }
426405}
427406
Original file line number Diff line number Diff line change @@ -83,30 +83,18 @@ cfg_match! {
8383
8484 // For character in the chunk, see if its byte value is < 0, which
8585 // indicates that it's part of a UTF-8 char.
86- #[ cfg( bootstrap) ]
87- let multibyte_test = unsafe { _mm_cmplt_epi8( chunk, _mm_set1_epi8( 0 ) ) } ;
88- #[ cfg( not( bootstrap) ) ]
8986 let multibyte_test = _mm_cmplt_epi8( chunk, _mm_set1_epi8( 0 ) ) ;
9087
9188 // Create a bit mask from the comparison results.
92- #[ cfg( bootstrap) ]
93- let multibyte_mask = unsafe { _mm_movemask_epi8( multibyte_test) } ;
94- #[ cfg( not( bootstrap) ) ]
9589 let multibyte_mask = _mm_movemask_epi8( multibyte_test) ;
9690
9791 // If the bit mask is all zero, we only have ASCII chars here:
9892 if multibyte_mask == 0 {
9993 assert!( intra_chunk_offset == 0 ) ;
10094
10195 // Check for newlines in the chunk
102- #[ cfg( bootstrap) ]
103- let newlines_test = unsafe { _mm_cmpeq_epi8( chunk, _mm_set1_epi8( b'\n' as i8 ) ) } ;
104- #[ cfg( not( bootstrap) ) ]
10596 let newlines_test = _mm_cmpeq_epi8( chunk, _mm_set1_epi8( b'\n' as i8 ) ) ;
10697
107- #[ cfg( bootstrap) ]
108- let mut newlines_mask = unsafe { _mm_movemask_epi8( newlines_test) } ;
109- #[ cfg( not( bootstrap) ) ]
11098 let mut newlines_mask = _mm_movemask_epi8( newlines_test) ;
11199
112100 let output_offset = RelativeBytePos :: from_usize( chunk_index * CHUNK_SIZE + 1 ) ;
Original file line number Diff line number Diff line change 1414#![ allow( internal_features) ]
1515#![ allow( rustc:: diagnostic_outside_of_impl) ]
1616#![ allow( rustc:: untranslatable_diagnostic) ]
17- #![ cfg_attr( bootstrap, feature( extract_if) ) ]
1817#![ doc( html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/" ) ]
1918#![ doc( rust_logo) ]
2019#![ feature( assert_matches) ]
Original file line number Diff line number Diff line change 1- #![ cfg_attr( bootstrap, feature( extract_if) ) ]
2- #![ cfg_attr( bootstrap, feature( unsigned_is_multiple_of) ) ]
31#![ feature( rustc_private) ]
42#![ feature( cfg_match) ]
53#![ feature( cell_update) ]
You can’t perform that action at this time.
0 commit comments