]> git.lizzy.rs Git - rust.git/blob - tests/ui/generator/issue-45729-unsafe-in-generator.rs
Auto merge of #106646 - Amanieu:ilp32-object, r=Mark-Simulacrum
[rust.git] / tests / ui / generator / issue-45729-unsafe-in-generator.rs
1 // revisions: mir thir
2 // [thir]compile-flags: -Z thir-unsafeck
3
4 #![feature(generators)]
5
6 fn main() {
7     let _ = || {
8         *(1 as *mut u32) = 42;
9         //~^ ERROR dereference of raw pointer is unsafe
10         yield;
11     };
12 }