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