]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-16538.rs
7d6eefa5b1e80471c8cd385ad9e09b15ad1dfdc6
[rust.git] / src / test / ui / issues / issue-16538.rs
1 mod Y {
2     pub type X = usize;
3     extern "C" {
4         pub static x: *const usize;
5     }
6     pub fn foo(value: *const X) -> *const X {
7         value
8     }
9 }
10
11 static foo: *const Y::X = Y::foo(Y::x as *const Y::X);
12 //~^ ERROR `*const usize` cannot be shared between threads safely [E0277]
13 //~| ERROR E0015
14 //~| ERROR use of extern static is unsafe and requires
15
16 fn main() {}