Sign in
android
/
toolchain
/
rustc
/
5139364148b53d79de1b5e778004d41a6a33a4a2
/
.
/
src
/
tools
/
miri
/
tests
/
fail
/
dangling_pointers
/
null_pointer_deref_zst.rs
blob: f8af43ff3529c7794ed4a3b5d0e0af5a572cf851 [
file
] [
log
] [
blame
]
#[
allow
(
deref_nullptr
)]
fn
main
()
{
let
x
:
()
=
unsafe
{
*
std
::
ptr
::
null
()
};
//~ ERROR: memory access failed: null pointer is a dangling pointer
panic
!(
"this should never print: {:?}"
,
x
);
}