]> git.lizzy.rs Git - rust.git/blob - src/test/ui/consts/miri_unleashed/raw_mutable_const.rs
Rollup merge of #98640 - cuviper:stable-rust-analyzer, r=Mark-Simulacrum
[rust.git] / src / test / ui / consts / miri_unleashed / raw_mutable_const.rs
1 // compile-flags: -Zunleash-the-miri-inside-of-you
2
3 #![allow(const_err)]
4
5 use std::cell::UnsafeCell;
6
7 const MUTABLE_BEHIND_RAW: *mut i32 = &UnsafeCell::new(42) as *const _ as *mut _;
8 //~^ ERROR: untyped pointers are not allowed in constant
9
10 fn main() {}