@@ -1909,7 +1909,11 @@ pub const fn forget<T: ?Sized>(_: T) {
1909
1909
/// }
1910
1910
/// ```
1911
1911
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
1912
- #[ rustc_allowed_through_unstable_modules]
1912
+ #[ cfg_attr( bootstrap, rustc_allowed_through_unstable_modules) ]
1913
+ #[ cfg_attr(
1914
+ not( bootstrap) ,
1915
+ rustc_allowed_through_unstable_modules = "import this function via `std::mem` instead"
1916
+ ) ]
1913
1917
#[ rustc_const_stable( feature = "const_transmute" , since = "1.56.0" ) ]
1914
1918
#[ rustc_diagnostic_item = "transmute" ]
1915
1919
#[ rustc_nounwind]
@@ -4353,7 +4357,11 @@ pub const fn ptr_metadata<P: ptr::Pointee<Metadata = M> + ?Sized, M>(_ptr: *cons
4353
4357
/// [`Vec::append`]: ../../std/vec/struct.Vec.html#method.append
4354
4358
#[ doc( alias = "memcpy" ) ]
4355
4359
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
4356
- #[ rustc_allowed_through_unstable_modules]
4360
+ #[ cfg_attr( bootstrap, rustc_allowed_through_unstable_modules) ]
4361
+ #[ cfg_attr(
4362
+ not( bootstrap) ,
4363
+ rustc_allowed_through_unstable_modules = "import this function via `std::mem` instead"
4364
+ ) ]
4357
4365
#[ rustc_const_stable( feature = "const_intrinsic_copy" , since = "1.83.0" ) ]
4358
4366
#[ inline( always) ]
4359
4367
#[ cfg_attr( miri, track_caller) ] // even without panics, this helps for Miri backtraces
@@ -4457,7 +4465,11 @@ pub const unsafe fn copy_nonoverlapping<T>(src: *const T, dst: *mut T, count: us
4457
4465
/// ```
4458
4466
#[ doc( alias = "memmove" ) ]
4459
4467
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
4460
- #[ rustc_allowed_through_unstable_modules]
4468
+ #[ cfg_attr( bootstrap, rustc_allowed_through_unstable_modules) ]
4469
+ #[ cfg_attr(
4470
+ not( bootstrap) ,
4471
+ rustc_allowed_through_unstable_modules = "import this function via `std::mem` instead"
4472
+ ) ]
4461
4473
#[ rustc_const_stable( feature = "const_intrinsic_copy" , since = "1.83.0" ) ]
4462
4474
#[ inline( always) ]
4463
4475
#[ cfg_attr( miri, track_caller) ] // even without panics, this helps for Miri backtraces
@@ -4540,7 +4552,11 @@ pub const unsafe fn copy<T>(src: *const T, dst: *mut T, count: usize) {
4540
4552
/// ```
4541
4553
#[ doc( alias = "memset" ) ]
4542
4554
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
4543
- #[ rustc_allowed_through_unstable_modules]
4555
+ #[ cfg_attr( bootstrap, rustc_allowed_through_unstable_modules) ]
4556
+ #[ cfg_attr(
4557
+ not( bootstrap) ,
4558
+ rustc_allowed_through_unstable_modules = "import this function via `std::mem` instead"
4559
+ ) ]
4544
4560
#[ rustc_const_stable( feature = "const_ptr_write" , since = "1.83.0" ) ]
4545
4561
#[ inline( always) ]
4546
4562
#[ cfg_attr( miri, track_caller) ] // even without panics, this helps for Miri backtraces
0 commit comments