File tree 9 files changed +3
-44
lines changed
rustc_trait_selection/src
9 files changed +3
-44
lines changed Original file line number Diff line number Diff line change 21
21
22
22
// tidy-alphabetical-start
23
23
#![ allow( internal_features) ]
24
- #![ cfg_attr( bootstrap, feature( extract_if) ) ]
25
24
#![ cfg_attr( doc, recursion_limit = "256" ) ] // FIXME(nnethercote): will be removed by #124141
26
25
#![ doc( html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/" ) ]
27
26
#![ doc( rust_logo) ]
Original file line number Diff line number Diff line change 1
1
// tidy-alphabetical-start
2
2
#![ allow( internal_features) ]
3
- #![ cfg_attr( bootstrap, feature( extract_if) ) ]
4
3
#![ cfg_attr( doc, recursion_limit = "256" ) ] // FIXME(nnethercote): will be removed by #124141
5
4
#![ doc( html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/" ) ]
6
5
#![ doc( rust_logo) ]
Original file line number Diff line number Diff line change 29
29
#![ allow( rustc:: diagnostic_outside_of_impl) ]
30
30
#![ allow( rustc:: potential_query_instability) ]
31
31
#![ allow( rustc:: untranslatable_diagnostic) ]
32
- #![ cfg_attr( bootstrap, feature( extract_if) ) ]
33
32
#![ cfg_attr( doc, recursion_limit = "256" ) ] // FIXME(nnethercote): will be removed by #124141
34
33
#![ doc( html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/" ) ]
35
34
#![ doc( rust_logo) ]
Original file line number Diff line number Diff line change 10
10
#![ allow( internal_features) ]
11
11
#![ allow( rustc:: diagnostic_outside_of_impl) ]
12
12
#![ allow( rustc:: untranslatable_diagnostic) ]
13
- #![ cfg_attr( bootstrap, feature( extract_if) ) ]
14
13
#![ doc( html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/" ) ]
15
14
#![ doc( rust_logo) ]
16
15
#![ feature( assert_matches) ]
Original file line number Diff line number Diff line change 3
3
// tidy-alphabetical-start
4
4
#![ allow( internal_features) ]
5
5
#![ allow( rustc:: internal) ]
6
- #![ cfg_attr( bootstrap, feature( ptr_sub_ptr) ) ]
7
6
#![ cfg_attr( test, feature( test) ) ]
8
7
#![ doc(
9
8
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> {
280
280
#[ inline]
281
281
pub fn len ( & self ) -> usize {
282
282
// 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 ) }
291
284
}
292
285
293
286
#[ inline]
294
287
pub fn remaining ( & self ) -> usize {
295
288
// 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 ) }
304
290
}
305
291
306
292
#[ cold]
@@ -414,14 +400,7 @@ impl<'a> Decoder for MemDecoder<'a> {
414
400
#[ inline]
415
401
fn position ( & self ) -> usize {
416
402
// 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 ) }
425
404
}
426
405
}
427
406
Original file line number Diff line number Diff line change @@ -83,30 +83,18 @@ cfg_match! {
83
83
84
84
// For character in the chunk, see if its byte value is < 0, which
85
85
// 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) ) ]
89
86
let multibyte_test = _mm_cmplt_epi8( chunk, _mm_set1_epi8( 0 ) ) ;
90
87
91
88
// 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) ) ]
95
89
let multibyte_mask = _mm_movemask_epi8( multibyte_test) ;
96
90
97
91
// If the bit mask is all zero, we only have ASCII chars here:
98
92
if multibyte_mask == 0 {
99
93
assert!( intra_chunk_offset == 0 ) ;
100
94
101
95
// 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) ) ]
105
96
let newlines_test = _mm_cmpeq_epi8( chunk, _mm_set1_epi8( b'\n' as i8 ) ) ;
106
97
107
- #[ cfg( bootstrap) ]
108
- let mut newlines_mask = unsafe { _mm_movemask_epi8( newlines_test) } ;
109
- #[ cfg( not( bootstrap) ) ]
110
98
let mut newlines_mask = _mm_movemask_epi8( newlines_test) ;
111
99
112
100
let output_offset = RelativeBytePos :: from_usize( chunk_index * CHUNK_SIZE + 1 ) ;
Original file line number Diff line number Diff line change 14
14
#![ allow( internal_features) ]
15
15
#![ allow( rustc:: diagnostic_outside_of_impl) ]
16
16
#![ allow( rustc:: untranslatable_diagnostic) ]
17
- #![ cfg_attr( bootstrap, feature( extract_if) ) ]
18
17
#![ doc( html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/" ) ]
19
18
#![ doc( rust_logo) ]
20
19
#![ 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) ) ]
3
1
#![ feature( rustc_private) ]
4
2
#![ feature( cfg_match) ]
5
3
#![ feature( cell_update) ]
You can’t perform that action at this time.
0 commit comments