rust/tests/fail/extern_static_in_const.rs
2022-07-11 11:48:56 +00:00

12 lines
228 B
Rust

//! 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
}