rust/tests/ui/unsafe/unsafe-fn-deref-ptr.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

10 lines
171 B
Rust
Raw Normal View History

// revisions: mir thir
// [thir]compile-flags: -Z thir-unsafeck
2014-06-25 19:47:34 +00:00
fn f(p: *const u8) -> u8 {
return *p; //~ ERROR dereference of raw pointer is unsafe
}
fn main() {
}