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