@@ -1897,7 +1897,11 @@ pub const fn forget<T: ?Sized>(_: T) {
1897
1897
/// }
1898
1898
/// ```
1899
1899
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
1900
- #[ rustc_allowed_through_unstable_modules]
1900
+ #[ cfg_attr( bootstrap, rustc_allowed_through_unstable_modules) ]
1901
+ #[ cfg_attr(
1902
+ not( bootstrap) ,
1903
+ rustc_allowed_through_unstable_modules = "import this function via `std::mem` instead"
1904
+ ) ]
1901
1905
#[ rustc_const_stable( feature = "const_transmute" , since = "1.56.0" ) ]
1902
1906
#[ rustc_diagnostic_item = "transmute" ]
1903
1907
#[ rustc_nounwind]
@@ -4325,7 +4329,11 @@ pub const fn ptr_metadata<P: ptr::Pointee<Metadata = M> + ?Sized, M>(_ptr: *cons
4325
4329
/// [`Vec::append`]: ../../std/vec/struct.Vec.html#method.append
4326
4330
#[ doc( alias = "memcpy" ) ]
4327
4331
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
4328
- #[ rustc_allowed_through_unstable_modules]
4332
+ #[ cfg_attr( bootstrap, rustc_allowed_through_unstable_modules) ]
4333
+ #[ cfg_attr(
4334
+ not( bootstrap) ,
4335
+ rustc_allowed_through_unstable_modules = "import this function via `std::mem` instead"
4336
+ ) ]
4329
4337
#[ rustc_const_stable( feature = "const_intrinsic_copy" , since = "1.83.0" ) ]
4330
4338
#[ inline( always) ]
4331
4339
#[ cfg_attr( miri, track_caller) ] // even without panics, this helps for Miri backtraces
@@ -4429,7 +4437,11 @@ pub const unsafe fn copy_nonoverlapping<T>(src: *const T, dst: *mut T, count: us
4429
4437
/// ```
4430
4438
#[ doc( alias = "memmove" ) ]
4431
4439
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
4432
- #[ rustc_allowed_through_unstable_modules]
4440
+ #[ cfg_attr( bootstrap, rustc_allowed_through_unstable_modules) ]
4441
+ #[ cfg_attr(
4442
+ not( bootstrap) ,
4443
+ rustc_allowed_through_unstable_modules = "import this function via `std::mem` instead"
4444
+ ) ]
4433
4445
#[ rustc_const_stable( feature = "const_intrinsic_copy" , since = "1.83.0" ) ]
4434
4446
#[ inline( always) ]
4435
4447
#[ cfg_attr( miri, track_caller) ] // even without panics, this helps for Miri backtraces
@@ -4512,7 +4524,11 @@ pub const unsafe fn copy<T>(src: *const T, dst: *mut T, count: usize) {
4512
4524
/// ```
4513
4525
#[ doc( alias = "memset" ) ]
4514
4526
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
4515
- #[ rustc_allowed_through_unstable_modules]
4527
+ #[ cfg_attr( bootstrap, rustc_allowed_through_unstable_modules) ]
4528
+ #[ cfg_attr(
4529
+ not( bootstrap) ,
4530
+ rustc_allowed_through_unstable_modules = "import this function via `std::mem` instead"
4531
+ ) ]
4516
4532
#[ rustc_const_stable( feature = "const_ptr_write" , since = "1.83.0" ) ]
4517
4533
#[ inline( always) ]
4518
4534
#[ cfg_attr( miri, track_caller) ] // even without panics, this helps for Miri backtraces
0 commit comments