Skip to content

Commit

Permalink
test_const_allocate_at_runtime
Browse files Browse the repository at this point in the history
  • Loading branch information
lilasta committed Jan 28, 2022
1 parent 29932db commit 7a7144f
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion library/core/tests/intrinsics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,16 @@ fn test_hints_in_const_contexts() {

#[cfg(not(bootstrap))]
#[test]
fn test_const_dealocate_at_runtime() {
fn test_const_allocate_at_runtime() {
use core::intrinsics::const_allocate;
unsafe {
assert!(const_allocate(4, 4).is_null());
}
}

#[cfg(not(bootstrap))]
#[test]
fn test_const_deallocate_at_runtime() {
use core::intrinsics::const_deallocate;
const X: &u32 = &42u32;
let x = &0u32;
Expand Down

0 comments on commit 7a7144f

Please sign in to comment.