blob: 4b7c6bf6985437630da48dd44ba427717c498c18 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
// revisions: mir thir
// [thir]compile-flags: -Z thir-unsafeck
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() {
}
|