Sign in
android
/
toolchain
/
rustc
/
2f3fdfeb95384b9046ea35b3532e23c652eca660
/
.
/
src
/
tools
/
miri
/
tests
/
compile-fail
/
null_pointer_deref.rs
blob: 076b2df609abdcec2fc20ab6f19f4eed40bf36fb [
file
] [
log
] [
blame
]
#[
allow
(
deref_nullptr
)]
fn
main
()
{
let
x
:
i32
=
unsafe
{
*
std
::
ptr
::
null
()
};
//~ ERROR null pointer is not a valid pointer for this operation
panic
!(
"this should never print: {}"
,
x
);
}