blob: 63348a2047c076c7cf8537819725556239e05f94 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
//@ run-pass
#![allow(path_statements)]
#![allow(dead_code)]
#![feature(coroutines, coroutine_trait)]
struct WithDrop;
impl Drop for WithDrop {
fn drop(&mut self) {}
}
fn reborrow_from_coroutine(r: &mut ()) {
let d = WithDrop;
#[coroutine] move || { d; yield; &mut *r }; //~ WARN unused coroutine that must be used
}
fn main() {}
|