2018-09-06 12:41:12 +00:00
|
|
|
//@ run-pass
|
2018-09-25 21:51:35 +00:00
|
|
|
#![allow(path_statements)]
|
|
|
|
#![allow(dead_code)]
|
2018-09-06 12:41:12 +00:00
|
|
|
|
2023-10-19 21:46:28 +00:00
|
|
|
#![feature(coroutines, coroutine_trait)]
|
2018-04-27 19:41:30 +00:00
|
|
|
|
|
|
|
struct WithDrop;
|
|
|
|
|
|
|
|
impl Drop for WithDrop {
|
|
|
|
fn drop(&mut self) {}
|
|
|
|
}
|
|
|
|
|
2023-10-19 21:46:28 +00:00
|
|
|
fn reborrow_from_coroutine(r: &mut ()) {
|
2018-04-27 19:41:30 +00:00
|
|
|
let d = WithDrop;
|
2024-04-11 13:15:34 +00:00
|
|
|
#[coroutine] move || { d; yield; &mut *r }; //~ WARN unused coroutine that must be used
|
2018-04-27 19:41:30 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {}
|