Sign in
fuchsia
/
third_party
/
rust
/
97d936423c914c4e3402bfecfd6943e1edf23815
/
.
/
src
/
test
/
ui
/
consts
/
const-deref-ptr.rs
blob: b5f603bb47ac43e9f08a3d76fb066d19214d5cd4 [
file
] [
log
] [
blame
]
// Check that you can't dereference raw pointers in constants.
fn
main
()
{
static
C
:
u64
=
unsafe
{*(
0xdeadbeef
as
*
const
u64
)};
//~^ ERROR dereferencing raw pointers in statics is unstable
println
!(
"{}"
,
C
);
}