rust/src/test/compile-fail/unsafe-fn-assign-deref-ptr.rs

10 lines
149 B
Rust
Raw Normal View History

2011-10-11 23:22:08 -05:00
// -*- rust -*-
fn f(p: *u8) {
*p = 0u8; //~ ERROR dereference of unsafe pointer requires unsafe function or block
2012-08-01 19:30:05 -05:00
return;
2011-10-11 23:22:08 -05:00
}
fn main() {
}