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

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

11 lines
172 B
Rust
Raw Normal View History

// revisions: mir thir
// [thir]compile-flags: -Z thir-unsafeck
fn f(p: *mut u8) {
*p = 0; //~ ERROR dereference of raw pointer is unsafe
2012-08-02 00:30:05 +00:00
return;
2011-10-12 04:22:08 +00:00
}
fn main() {
}