blob: 5f2f471bf6098c6d9883a929f8ee29f6da519f03 (
plain)
1
2
3
4
5
6
7
8
9
10
|
// This should fail even without validation
//@compile-flags: -Zmiri-disable-validation
#![feature(never_type)]
#![allow(unreachable_code)]
fn main() {
let ptr: *const (i32, !) = &0i32 as *const i32 as *const _;
unsafe { match (*ptr).1 {} } //~ ERROR: entering unreachable code
}
|