Files
rust/src/test/ui/issues/issue-16538.rs

17 lines
371 B
Rust
Raw Normal View History

mod Y {
2016-02-22 22:33:38 +00:00
pub type X = usize;
extern {
2016-02-22 22:33:38 +00:00
pub static x: *const usize;
}
2016-02-22 22:33:38 +00:00
pub fn foo(value: *const X) -> *const X {
value
}
}
static foo: *const Y::X = Y::foo(Y::x as *const Y::X);
//~^ ERROR `*const usize` cannot be shared between threads safely [E0277]
//~| ERROR E0015
2019-08-03 19:34:21 +02:00
//~| ERROR use of extern static is unsafe and requires
fn main() {}