os-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-01 17:30:05 -07:00
return;
2011-10-11 21:22:08 -07:00
}
fn main() {
}