2 // [thir]compile-flags: -Z thir-unsafeck
4 #![feature(const_raw_ptr_deref)]
8 pub static x: *const usize;
10 pub fn foo(value: *const X) -> *const X {
15 static foo: &Y::X = &*Y::foo(Y::x as *const Y::X);
16 //~^ ERROR dereference of raw pointer
18 //~| ERROR use of extern static is unsafe and requires