2015-05-27 16:35:56 -05:00
|
|
|
// Check that you can't dereference raw pointers in constants.
|
|
|
|
|
|
|
|
fn main() {
|
2018-07-02 12:00:07 -05:00
|
|
|
static C: u64 = unsafe {*(0xdeadbeef as *const u64)};
|
|
|
|
//~^ ERROR dereferencing raw pointers in statics is unstable
|
2015-05-27 16:35:56 -05:00
|
|
|
println!("{}", C);
|
|
|
|
}
|