File tree Expand file tree Collapse file tree 4 files changed +16
-7
lines changed
Expand file tree Collapse file tree 4 files changed +16
-7
lines changed Original file line number Diff line number Diff line change 2626#![ stable( feature = "rust1" , since = "1.0.0" ) ]
2727
2828mod bytewise;
29- #[ cfg( not( bootstrap) ) ]
30- mod pattern;
3129pub ( crate ) use bytewise:: BytewiseEq ;
3230
3331use self :: Ordering :: * ;
Original file line number Diff line number Diff line change @@ -1965,7 +1965,6 @@ pub const fn needs_drop<T: ?Sized>() -> bool {
19651965/// of bounds or arithmetic overflow occurs then this operation is undefined behavior.
19661966///
19671967/// The stabilized version of this intrinsic is [`pointer::offset`].
1968- #[ cfg_attr( not( bootstrap) , lang = "offset" ) ]
19691968#[ must_use = "returns a new pointer rather than modifying its argument" ]
19701969#[ rustc_intrinsic_const_stable_indirect]
19711970#[ rustc_nounwind]
@@ -4203,7 +4202,6 @@ pub const fn type_id<T: ?Sized + 'static>() -> u128 {
42034202/// This is used to implement functions like `slice::from_raw_parts_mut` and
42044203/// `ptr::from_raw_parts` in a way compatible with the compiler being able to
42054204/// change the possible layouts of pointers.
4206- #[ cfg_attr( not( bootstrap) , lang = "aggregate_raw_ptr" ) ]
42074205#[ rustc_nounwind]
42084206#[ unstable( feature = "core_intrinsics" , issue = "none" ) ]
42094207#[ rustc_intrinsic_const_stable_indirect]
Original file line number Diff line number Diff line change @@ -252,6 +252,9 @@ pub use crate::macros::cfg_match;
252252#[ macro_use]
253253mod internal_macros;
254254
255+ #[ cfg( not( bootstrap) ) ]
256+ mod match_internals;
257+
255258#[ path = "num/shells/int_macros.rs" ]
256259#[ macro_use]
257260mod int_macros;
Original file line number Diff line number Diff line change 11use crate :: cmp:: BytewiseEq ;
2- use crate :: intrinsics:: compare_bytes;
3- use crate :: mem;
2+ use crate :: { intrinsics, mem} ;
3+
4+ #[ lang = "aggregate_raw_ptr" ]
5+ const fn aggregate_raw_ptr < T > ( data : * const T , meta : usize ) -> * const [ T ] {
6+ intrinsics:: aggregate_raw_ptr ( data, meta)
7+ }
8+
9+ #[ lang = "offset" ]
10+ const fn offset < T > ( ptr : * const T , offset : usize ) -> * const T {
11+ unsafe { intrinsics:: offset ( ptr, offset) }
12+ }
413
514#[ lang = "PatternConstEq" ]
615#[ const_trait]
6877 // The two slices have been checked to have the same size above.
6978 unsafe {
7079 let size = mem:: size_of_val ( self ) ;
71- compare_bytes ( self . as_ptr ( ) as * const u8 , other. as_ptr ( ) as * const u8 , size) == 0
80+ intrinsics:: compare_bytes ( self . as_ptr ( ) as * const u8 , other. as_ptr ( ) as * const u8 , size)
81+ == 0
7282 }
7383 }
7484}
You can’t perform that action at this time.
0 commit comments