Sign in
android
/
toolchain
/
rustc
/
refs/heads/rust-1.73.0
/
.
/
src
/
tools
/
miri
/
tests
/
fail
/
shims
/
memrchr_null.rs
blob: b6707d558d8f632e8e382066da23b8ac9d278a1b [
file
] [
log
] [
blame
]
//@ignore-target-windows: No libc on Windows
//@ignore-target-apple: No `memrchr` on some apple targets
use
std
::
ptr
;
// null is explicitly called out as UB in the C docs.
fn
main
()
{
unsafe
{
libc
::
memrchr
(
ptr
::
null
(),
0
,
0
);
//~ERROR: dangling
}
}