]> git.lizzy.rs Git - rust.git/blob - src/test/ui/safe-extern-statics-mut.rs
Rollup merge of #65389 - ecstatic-morse:zero-sized-array-no-drop, r=eddyb
[rust.git] / src / test / ui / safe-extern-statics-mut.rs
1 // aux-build:extern-statics.rs
2
3 extern crate extern_statics;
4 use extern_statics::*;
5
6 extern {
7     static mut B: u8;
8 }
9
10 fn main() {
11     let b = B; //~ ERROR use of mutable static is unsafe
12     let rb = &B; //~ ERROR use of mutable static is unsafe
13     let xb = XB; //~ ERROR use of mutable static is unsafe
14     let xrb = &XB; //~ ERROR use of mutable static is unsafe
15 }