@@ -1909,7 +1909,11 @@ pub const fn forget<T: ?Sized>(_: T) {
19091909/// }
19101910/// ```
19111911#[ 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+ ) ]
19131917#[ rustc_const_stable( feature = "const_transmute" , since = "1.56.0" ) ]
19141918#[ rustc_diagnostic_item = "transmute" ]
19151919#[ rustc_nounwind]
@@ -4353,7 +4357,11 @@ pub const fn ptr_metadata<P: ptr::Pointee<Metadata = M> + ?Sized, M>(_ptr: *cons
43534357/// [`Vec::append`]: ../../std/vec/struct.Vec.html#method.append
43544358#[ doc( alias = "memcpy" ) ]
43554359#[ 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+ ) ]
43574365#[ rustc_const_stable( feature = "const_intrinsic_copy" , since = "1.83.0" ) ]
43584366#[ inline( always) ]
43594367#[ 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
44574465/// ```
44584466#[ doc( alias = "memmove" ) ]
44594467#[ 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+ ) ]
44614473#[ rustc_const_stable( feature = "const_intrinsic_copy" , since = "1.83.0" ) ]
44624474#[ inline( always) ]
44634475#[ 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) {
45404552/// ```
45414553#[ doc( alias = "memset" ) ]
45424554#[ 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+ ) ]
45444560#[ rustc_const_stable( feature = "const_ptr_write" , since = "1.83.0" ) ]
45454561#[ inline( always) ]
45464562#[ cfg_attr( miri, track_caller) ] // even without panics, this helps for Miri backtraces
0 commit comments