rust/tests/ui/coroutine/issue-45729-unsafe-in-coroutine.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

13 lines
230 B
Rust
Raw Normal View History

// revisions: mir thir
// [thir]compile-flags: -Z thir-unsafeck
2023-10-19 16:46:28 -05:00
#![feature(coroutines)]
fn main() {
let _ = || {
*(1 as *mut u32) = 42;
//~^ ERROR dereference of raw pointer is unsafe
yield;
};
}