blob: 7087b6e6a6764eab2b8d4041c1b05697250e738a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
// compile-flags: -Zunleash-the-miri-inside-of-you
#![allow(dead_code)]
const TEST: &u8 = &MY_STATIC;
//~^ ERROR it is undefined behavior to use this value
//~| NOTE encountered a reference pointing to a static variable
//~| NOTE
static MY_STATIC: u8 = 4;
fn main() {
}
|