Skip to content

Commit 7a7144f

Browse files
committed
test_const_allocate_at_runtime
1 parent 29932db commit 7a7144f

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

library/core/tests/intrinsics.rs

+10-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,16 @@ fn test_hints_in_const_contexts() {
8383

8484
#[cfg(not(bootstrap))]
8585
#[test]
86-
fn test_const_dealocate_at_runtime() {
86+
fn test_const_allocate_at_runtime() {
87+
use core::intrinsics::const_allocate;
88+
unsafe {
89+
assert!(const_allocate(4, 4).is_null());
90+
}
91+
}
92+
93+
#[cfg(not(bootstrap))]
94+
#[test]
95+
fn test_const_deallocate_at_runtime() {
8796
use core::intrinsics::const_deallocate;
8897
const X: &u32 = &42u32;
8998
let x = &0u32;

0 commit comments

Comments
 (0)