rust/tests/fail/extern_static.rs

10 lines
217 B
Rust
Raw Normal View History

//! Even referencing an unknown `extern static` already triggers an error.
extern "C" {
static mut FOO: i32;
}
fn main() {
2021-01-31 06:12:25 -06:00
let _val = unsafe { std::ptr::addr_of!(FOO) }; //~ ERROR is not supported by Miri
}