rust/tests/ui/consts/const-eval/heap/dealloc_intrinsic_duplicate.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

14 lines
307 B
Rust
Raw Permalink Normal View History

2021-12-25 07:35:11 -06:00
#![feature(core_intrinsics)]
#![feature(const_heap)]
use std::intrinsics;
const _X: () = unsafe {
let ptr = intrinsics::const_allocate(4, 4);
intrinsics::const_deallocate(ptr, 4, 4);
intrinsics::const_deallocate(ptr, 4, 4);
//~^ error: evaluation of constant value failed
};
fn main() {}