]> git.lizzy.rs Git - rust.git/blob - tests/ui/unsafe/unsafe-fn-assign-deref-ptr.rs
Auto merge of #107843 - bjorn3:sync_cg_clif-2023-02-09, r=bjorn3
[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 }