]>
Commit | Line | Data |
---|---|---|
9e0c209e | 1 | // aux-build:extern-statics.rs |
17df50a5 XL |
2 | // revisions: mir thir |
3 | // [thir]compile-flags: -Z thir-unsafeck | |
9e0c209e | 4 | |
9e0c209e SL |
5 | extern crate extern_statics; |
6 | use extern_statics::*; | |
7 | ||
5869c6ff | 8 | extern "C" { |
9e0c209e SL |
9 | static mut B: u8; |
10 | } | |
11 | ||
12 | fn main() { | |
8faf50e0 XL |
13 | let b = B; //~ ERROR use of mutable static is unsafe |
14 | let rb = &B; //~ ERROR use of mutable static is unsafe | |
15 | let xb = XB; //~ ERROR use of mutable static is unsafe | |
16 | let xrb = &XB; //~ ERROR use of mutable static is unsafe | |
9e0c209e | 17 | } |