test referencing unsupported extern static

This commit is contained in:
Ralf Jung 2020-07-26 15:55:15 +02:00
parent 7b07fc385c
commit 390899e8b9

View File

@ -0,0 +1,10 @@
#![feature(raw_ref_op)]
//! Even referencing an unknown `extern static` already triggers an error.
extern "C" {
static mut FOO: i32;
}
fn main() {
let _val = unsafe { &raw const FOO }; //~ ERROR is not supported by Miri
}