rust/tests/ui/unsafe/unsafe-fn-deref-ptr.rs
Matthew Jasper 982b49494e Remove revisions for THIR unsafeck
This is to make the diff when stabilizing it easier to review.
2024-01-05 09:30:27 +00:00

9 lines
295 B
Rust

fn f(p: *const u8) -> u8 {
let _ = *p; //~ ERROR dereference of raw pointer is unsafe
let _: u8 = *p; //~ ERROR dereference of raw pointer is unsafe
_ = *p; //~ ERROR dereference of raw pointer is unsafe
return *p; //~ ERROR dereference of raw pointer is unsafe
}
fn main() {
}