rust/src/test/compile-fail/unsafe-fn-assign-deref-ptr.rs
2012-08-01 19:16:06 -07:00

10 lines
149 B
Rust

// -*- rust -*-
fn f(p: *u8) {
*p = 0u8; //~ ERROR dereference of unsafe pointer requires unsafe function or block
return;
}
fn main() {
}