@@ -1385,7 +1385,6 @@ extern "rust-intrinsic" {
1385
1385
///
1386
1386
/// This is not expected to ever be exposed directly to users, rather it
1387
1387
/// may eventually be exposed through some more-constrained API.
1388
- #[ cfg( not( bootstrap) ) ]
1389
1388
#[ rustc_const_stable( feature = "const_transmute" , since = "1.56.0" ) ]
1390
1389
#[ rustc_nounwind]
1391
1390
pub fn transmute_unchecked < Src , Dst > ( src : Src ) -> Dst ;
@@ -1425,19 +1424,11 @@ extern "rust-intrinsic" {
1425
1424
/// returned value will result in undefined behavior.
1426
1425
///
1427
1426
/// The stabilized version of this intrinsic is [`pointer::offset`].
1428
- #[ cfg( not( bootstrap) ) ]
1429
1427
#[ must_use = "returns a new pointer rather than modifying its argument" ]
1430
1428
#[ rustc_const_stable( feature = "const_ptr_offset" , since = "1.61.0" ) ]
1431
1429
#[ rustc_nounwind]
1432
1430
pub fn offset < Ptr , Delta > ( dst : Ptr , offset : Delta ) -> Ptr ;
1433
1431
1434
- /// The bootstrap version of this is more restricted.
1435
- #[ cfg( bootstrap) ]
1436
- #[ must_use = "returns a new pointer rather than modifying its argument" ]
1437
- #[ rustc_const_stable( feature = "const_ptr_offset" , since = "1.61.0" ) ]
1438
- #[ rustc_nounwind]
1439
- pub fn offset < T > ( dst : * const T , offset : isize ) -> * const T ;
1440
-
1441
1432
/// Calculates the offset from a pointer, potentially wrapping.
1442
1433
///
1443
1434
/// This is implemented as an intrinsic to avoid converting to and from an
@@ -2270,7 +2261,6 @@ extern "rust-intrinsic" {
2270
2261
/// This intrinsic can *only* be called where the pointer is a local without
2271
2262
/// projections (`write_via_move(ptr, x)`, not `write_via_move(*ptr, x)`) so
2272
2263
/// that it trivially obeys runtime-MIR rules about derefs in operands.
2273
- #[ cfg( not( bootstrap) ) ]
2274
2264
#[ rustc_const_unstable( feature = "const_ptr_write" , issue = "86302" ) ]
2275
2265
#[ rustc_nounwind]
2276
2266
pub fn write_via_move < T > ( ptr : * mut T , value : T ) ;
@@ -2832,24 +2822,3 @@ pub const unsafe fn write_bytes<T>(dst: *mut T, val: u8, count: usize) {
2832
2822
write_bytes ( dst, val, count)
2833
2823
}
2834
2824
}
2835
-
2836
- /// Polyfill for bootstrap
2837
- #[ cfg( bootstrap) ]
2838
- pub const unsafe fn transmute_unchecked < Src , Dst > ( src : Src ) -> Dst {
2839
- use crate :: mem:: * ;
2840
- // SAFETY: It's a transmute -- the caller promised it's fine.
2841
- unsafe { transmute_copy ( & ManuallyDrop :: new ( src) ) }
2842
- }
2843
-
2844
- /// Polyfill for bootstrap
2845
- #[ cfg( bootstrap) ]
2846
- pub const unsafe fn write_via_move < T > ( ptr : * mut T , value : T ) {
2847
- use crate :: mem:: * ;
2848
- // SAFETY: the caller must guarantee that `dst` is valid for writes.
2849
- // `dst` cannot overlap `src` because the caller has mutable access
2850
- // to `dst` while `src` is owned by this function.
2851
- unsafe {
2852
- copy_nonoverlapping :: < T > ( & value, ptr, 1 ) ;
2853
- forget ( value) ;
2854
- }
2855
- }
0 commit comments