rust/src/test/compile-fail/unsafe-fn-assign-deref-ptr.rs
2012-05-09 17:00:19 -07:00

10 lines
146 B
Rust

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