rust/src/test/compile-fail/unsafe-fn-assign-deref-ptr.rs
Niko Matsakis 5b015288b5 new test
2011-10-12 16:33:07 -07:00

12 lines
150 B
Rust

// -*- rust -*-
// error-pattern: unsafe operation requires unsafe function or block
fn f(p: *u8) {
*p = 0u8;
ret;
}
fn main() {
f();
}