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 +33
-3
lines changed
rustc_trait_selection/src Expand file tree Collapse file tree 9 files changed +33
-3
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) ) ]
2425#![ cfg_attr( doc, recursion_limit = "256" ) ] // FIXME(nnethercote): will be removed by #124141
2526#![ doc( html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/" ) ]
2627#![ 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) ) ]
34#![ cfg_attr( doc, recursion_limit = "256" ) ] // FIXME(nnethercote): will be removed by #124141
45#![ doc( html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/" ) ]
56#![ 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) ) ]
3233#![ cfg_attr( doc, recursion_limit = "256" ) ] // FIXME(nnethercote): will be removed by #124141
3334#![ doc( html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/" ) ]
3435#![ doc( rust_logo) ]
Original file line number Diff line number Diff line change 1111#![ allow( rustc:: diagnostic_outside_of_impl) ]
1212#![ allow( rustc:: potential_query_instability) ]
1313#![ allow( rustc:: untranslatable_diagnostic) ]
14+ #![ cfg_attr( bootstrap, feature( extract_if) ) ]
1415#![ doc( html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/" ) ]
1516#![ doc( rust_logo) ]
1617#![ 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) ) ]
67#![ cfg_attr( test, feature( test) ) ]
78#![ doc(
89 html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/" ,
Original file line number Diff line number Diff line change @@ -280,13 +280,27 @@ 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- unsafe { self . end . offset_from_unsigned ( self . start ) }
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+ }
284291 }
285292
286293 #[ inline]
287294 pub fn remaining ( & self ) -> usize {
288295 // SAFETY: This type guarantees current <= end.
289- unsafe { self . end . offset_from_unsigned ( self . current ) }
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+ }
290304 }
291305
292306 #[ cold]
@@ -400,7 +414,14 @@ impl<'a> Decoder for MemDecoder<'a> {
400414 #[ inline]
401415 fn position ( & self ) -> usize {
402416 // SAFETY: This type guarantees start <= current
403- unsafe { self . current . offset_from_unsigned ( self . start ) }
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+ }
404425 }
405426}
406427
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) ) ]
1718#![ doc( html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/" ) ]
1819#![ doc( rust_logo) ]
1920#![ feature( assert_matches) ]
Original file line number Diff line number Diff line change 2222#![ allow( clippy:: collapsible_if, clippy:: collapsible_else_if) ]
2323#![ allow( rustc:: diagnostic_outside_of_impl) ]
2424#![ allow( rustc:: untranslatable_diagnostic) ]
25+ #![ cfg_attr( bootstrap, feature( os_str_display) ) ]
2526
2627extern crate thin_vec;
2728
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) ) ]
13#![ feature( rustc_private) ]
24#![ feature( cfg_match) ]
35#![ feature( cell_update) ]
You can’t perform that action at this time.
0 commit comments