Skip to content

Commit a492e33

Browse files
committed
Add intrinsics::const_deallocate
1 parent 33eb941 commit a492e33

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

core/src/intrinsics.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1918,6 +1918,12 @@ extern "rust-intrinsic" {
19181918
#[rustc_const_unstable(feature = "const_heap", issue = "79597")]
19191919
pub fn const_allocate(size: usize, align: usize) -> *mut u8;
19201920

1921+
/// Deallocate a memory which allocated by `intrinsics::const_allocate` at compile time.
1922+
/// Should not be called at runtime.
1923+
#[rustc_const_unstable(feature = "const_heap", issue = "79597")]
1924+
#[cfg(not(bootstrap))]
1925+
pub fn const_deallocate(ptr: *mut u8, size: usize, align: usize);
1926+
19211927
/// Determines whether the raw bytes of the two values are equal.
19221928
///
19231929
/// This is particularly handy for arrays, since it allows things like just

0 commit comments

Comments
 (0)