]> git.proxmox.com Git - rustc.git/blob - src/tools/miri/tests/compile-fail/never_say_never.rs
New upstream version 1.22.1+dfsg1
[rustc.git] / src / tools / miri / tests / compile-fail / never_say_never.rs
1 #![feature(never_type)]
2 #![allow(unreachable_code)]
3
4 fn main() {
5 let y = &5;
6 let x: ! = unsafe {
7 *(y as *const _ as *const !) //~ ERROR tried to access a dead local variable
8 };
9 f(x)
10 }
11
12 fn f(x: !) -> ! { x }