rust/src/test/mir-opt/const_prop/const_prop_fails_gracefully.rs

10 lines
171 B
Rust
Raw Normal View History

#[inline(never)]
fn read(_: usize) { }
2020-04-04 17:15:01 +00:00
// EMIT_MIR rustc.main.ConstProp.diff
fn main() {
const FOO: &i32 = &1;
let x = FOO as *const i32 as usize;
read(x);
}