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

10 lines
146 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
2011-10-11 23:22:08 -05:00
ret;
}
fn main() {
}