]> git.lizzy.rs Git - rust.git/blob - tests/ui/unsafe/unsafe-fn-assign-deref-ptr.rs
Rollup merge of #106726 - cmorin6:fix-comment-typos, r=Nilstrieb
[rust.git] / tests / ui / unsafe / unsafe-fn-assign-deref-ptr.rs
1 // revisions: mir thir
2 // [thir]compile-flags: -Z thir-unsafeck
3
4 fn f(p: *mut u8) {
5     *p = 0; //~ ERROR dereference of raw pointer is unsafe
6     return;
7 }
8
9 fn main() {
10 }