Sign in
rust
/
miri
/
refs/heads/try
/
.
/
tests
/
fail
/
dangling_pointers
/
null_pointer_deref_zst.rs
blob: f8af43ff3529c7794ed4a3b5d0e0af5a572cf851 [
file
] [
log
] [
blame
] [
edit
]
#[
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
);
}