rust/tests/fail/extern_static_in_const.rs

12 lines
228 B
Rust
Raw Normal View History

//! Even referencing an unknown `extern static` already triggers an error.
extern "C" {
static E: [u8; 0];
}
static X: &'static [u8; 0] = unsafe { &E };
fn main() {
let _val = X; //~ ERROR: is not supported by Miri
}