@@ -2368,20 +2368,6 @@ extern "rust-intrinsic" {
23682368 #[ rustc_nounwind]
23692369 pub fn ptr_guaranteed_cmp < T > ( ptr : * const T , other : * const T ) -> u8 ;
23702370
2371- /// Deallocates a memory which allocated by `intrinsics::const_allocate` at compile time.
2372- /// At runtime, does nothing.
2373- ///
2374- /// # Safety
2375- ///
2376- /// - The `align` argument must be a power of two.
2377- /// - At compile time, a compile error occurs if this constraint is violated.
2378- /// - At runtime, it is not checked.
2379- /// - If the `ptr` is created in an another const, this intrinsic doesn't deallocate it.
2380- /// - If the `ptr` is pointing to a local variable, this intrinsic doesn't deallocate it.
2381- #[ rustc_const_unstable( feature = "const_heap" , issue = "79597" ) ]
2382- #[ rustc_nounwind]
2383- pub fn const_deallocate ( ptr : * mut u8 , size : usize , align : usize ) ;
2384-
23852371 /// Determines whether the raw bytes of the two values are equal.
23862372 ///
23872373 /// This is particularly handy for arrays, since it allows things like just
@@ -2570,13 +2556,30 @@ pub const unsafe fn is_val_statically_known<T: Copy>(_arg: T) -> bool {
25702556/// - At compile time, a compile error occurs if this constraint is violated.
25712557/// - At runtime, it is not checked.
25722558#[ rustc_const_unstable( feature = "const_heap" , issue = "79597" ) ]
2559+ #[ unstable( feature = "core_intrinsics" , issue = "none" ) ]
25732560#[ rustc_nounwind]
25742561#[ cfg_attr( not( bootstrap) , rustc_intrinsic) ]
25752562pub const unsafe fn const_allocate ( _size : usize , _align : usize ) -> * mut u8 {
25762563 // const eval overrides this function, but runtime code should always just return null pointers.
25772564 crate :: ptr:: null_mut ( )
25782565}
25792566
2567+ /// Deallocates a memory which allocated by `intrinsics::const_allocate` at compile time.
2568+ /// At runtime, does nothing.
2569+ ///
2570+ /// # Safety
2571+ ///
2572+ /// - The `align` argument must be a power of two.
2573+ /// - At compile time, a compile error occurs if this constraint is violated.
2574+ /// - At runtime, it is not checked.
2575+ /// - If the `ptr` is created in an another const, this intrinsic doesn't deallocate it.
2576+ /// - If the `ptr` is pointing to a local variable, this intrinsic doesn't deallocate it.
2577+ #[ rustc_const_unstable( feature = "const_heap" , issue = "79597" ) ]
2578+ #[ unstable( feature = "core_intrinsics" , issue = "none" ) ]
2579+ #[ rustc_nounwind]
2580+ #[ cfg_attr( not( bootstrap) , rustc_intrinsic) ]
2581+ pub const unsafe fn const_deallocate ( _ptr : * mut u8 , _size : usize , _align : usize ) { }
2582+
25802583// Some functions are defined here because they accidentally got made
25812584// available in this module on stable. See <https://github.com/rust-lang/rust/issues/15702>.
25822585// (`transmute` also falls into this category, but it cannot be wrapped due to the
0 commit comments