Sign in
android
/
toolchain
/
rustc
/
f7ad1c480b8dc4097ef67cd82ec1c5b706e10950
/
.
/
src
/
test
/
ui
/
consts
/
const-deref-ptr.rs
blob: 4aca75e3a1793326bbd9d2208dd9c9d6ca547ba9 [
file
] [
log
] [
blame
]
// Check that you can't dereference invalid raw pointers in constants.
fn
main
()
{
static
C
:
u64
=
unsafe
{*(
0xdeadbeef
as
*
const
u64
)};
//~^ ERROR could not evaluate static initializer
println
!(
"{}"
,
C
);
}