]> git.lizzy.rs Git - rust.git/blob - src/test/ui/safe-extern-statics.rs
Rollup merge of #82259 - osa1:issue82156, r=petrochenkov
[rust.git] / src / test / ui / safe-extern-statics.rs
1 // aux-build:extern-statics.rs
2
3 extern crate extern_statics;
4 use extern_statics::*;
5
6 extern "C" {
7     static A: u8;
8 }
9
10 fn main() {
11     let a = A; //~ ERROR use of extern static is unsafe
12     let ra = &A; //~ ERROR use of extern static is unsafe
13     let xa = XA; //~ ERROR use of extern static is unsafe
14     let xra = &XA; //~ ERROR use of extern static is unsafe
15 }