1
Fork 0
rust/src/test/ui/consts/const-prop-read-static-in-const.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

12 lines
275 B
Rust
Raw Normal View History

// compile-flags: -Zunleash-the-miri-inside-of-you
#![allow(dead_code)]
const TEST: u8 = MY_STATIC; //~ ERROR any use of this value will cause an error
2021-01-30 14:49:22 +01:00
//~| WARN this was previously accepted by the compiler but is being phased out
static MY_STATIC: u8 = 4;
fn main() {
}