2024-04-11 13:15:34 +00:00
|
|
|
#![feature(coroutines, stmt_expr_attributes)]
|
2017-11-05 16:48:22 +02:00
|
|
|
|
|
|
|
|
fn main() {
|
2024-04-11 13:15:34 +00:00
|
|
|
let _ = #[coroutine]
|
|
|
|
|
|| {
|
2017-11-05 16:48:22 +02:00
|
|
|
*(1 as *mut u32) = 42;
|
2018-07-10 10:52:05 +02:00
|
|
|
//~^ ERROR dereference of raw pointer is unsafe
|
2017-11-05 16:48:22 +02:00
|
|
|
yield;
|
|
|
|
|
};
|
|
|
|
|
}
|