]> git.lizzy.rs Git - rust.git/blob - src/test/ui/safe-extern-statics.rs
Auto merge of #87150 - rusticstuff:simplify_wrapping_neg, r=m-ou-se
[rust.git] / src / test / ui / safe-extern-statics.rs
1 // aux-build:extern-statics.rs
2 // revisions: mir thir
3 // [thir]compile-flags: -Z thir-unsafeck
4
5 extern crate extern_statics;
6 use extern_statics::*;
7
8 extern "C" {
9     static A: u8;
10 }
11
12 fn main() {
13     let a = A; //~ ERROR use of extern static is unsafe
14     let ra = &A; //~ ERROR use of extern static is unsafe
15     let xa = XA; //~ ERROR use of extern static is unsafe
16     let xra = &XA; //~ ERROR use of extern static is unsafe
17 }