mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-30 10:45:18 +00:00
19 lines
334 B
Rust
19 lines
334 B
Rust
//@ 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;
|
|
move || { d; yield; &mut *r }; //~ WARN unused coroutine that must be used
|
|
}
|
|
|
|
fn main() {}
|