@@ -2368,20 +2368,6 @@ extern "rust-intrinsic" {
2368
2368
#[ rustc_nounwind]
2369
2369
pub fn ptr_guaranteed_cmp < T > ( ptr : * const T , other : * const T ) -> u8 ;
2370
2370
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
-
2385
2371
/// Determines whether the raw bytes of the two values are equal.
2386
2372
///
2387
2373
/// This is particularly handy for arrays, since it allows things like just
@@ -2591,13 +2577,30 @@ pub(crate) const unsafe fn debug_assertions() -> bool {
2591
2577
/// - At compile time, a compile error occurs if this constraint is violated.
2592
2578
/// - At runtime, it is not checked.
2593
2579
#[ rustc_const_unstable( feature = "const_heap" , issue = "79597" ) ]
2580
+ #[ unstable( feature = "core_intrinsics" , issue = "none" ) ]
2594
2581
#[ rustc_nounwind]
2595
2582
#[ cfg_attr( not( bootstrap) , rustc_intrinsic) ]
2596
2583
pub const unsafe fn const_allocate ( _size : usize , _align : usize ) -> * mut u8 {
2597
2584
// const eval overrides this function, but runtime code should always just return null pointers.
2598
2585
crate :: ptr:: null_mut ( )
2599
2586
}
2600
2587
2588
+ /// Deallocates a memory which allocated by `intrinsics::const_allocate` at compile time.
2589
+ /// At runtime, does nothing.
2590
+ ///
2591
+ /// # Safety
2592
+ ///
2593
+ /// - The `align` argument must be a power of two.
2594
+ /// - At compile time, a compile error occurs if this constraint is violated.
2595
+ /// - At runtime, it is not checked.
2596
+ /// - If the `ptr` is created in an another const, this intrinsic doesn't deallocate it.
2597
+ /// - If the `ptr` is pointing to a local variable, this intrinsic doesn't deallocate it.
2598
+ #[ rustc_const_unstable( feature = "const_heap" , issue = "79597" ) ]
2599
+ #[ unstable( feature = "core_intrinsics" , issue = "none" ) ]
2600
+ #[ rustc_nounwind]
2601
+ #[ cfg_attr( not( bootstrap) , rustc_intrinsic) ]
2602
+ pub const unsafe fn const_deallocate ( _ptr : * mut u8 , _size : usize , _align : usize ) { }
2603
+
2601
2604
// Some functions are defined here because they accidentally got made
2602
2605
// available in this module on stable. See <https://github.com/rust-lang/rust/issues/15702>.
2603
2606
// (`transmute` also falls into this category, but it cannot be wrapped due to the
0 commit comments