about summary refs log tree commit diff
path: root/tests/ui/coroutine/issue-45729-unsafe-in-coroutine.rs
blob: d90886b6b1d6eb52d488218913499192d82595f6 (plain)
1
2
3
4
5
6
7
8
9
10
#![feature(coroutines, stmt_expr_attributes)]

fn main() {
    let _ = #[coroutine]
    || {
        *(1 as *mut u32) = 42;
        //~^ ERROR dereference of raw pointer is unsafe
        yield;
    };
}