rust/tests/ui/consts/miri_unleashed/raw_mutable_const.rs

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

9 lines
227 B
Rust
Raw Normal View History

// compile-flags: -Zunleash-the-miri-inside-of-you
use std::cell::UnsafeCell;
const MUTABLE_BEHIND_RAW: *mut i32 = &UnsafeCell::new(42) as *const _ as *mut _;
//~^ ERROR: unsupported untyped pointer in constant
fn main() {}