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
|
|
|
|
2018-04-27 14:41:30 -05:00
|
|
|
#![feature(generators, generator_trait)]
|
|
|
|
|
|
|
|
struct WithDrop;
|
|
|
|
|
|
|
|
impl Drop for WithDrop {
|
|
|
|
fn drop(&mut self) {}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn reborrow_from_generator(r: &mut ()) {
|
|
|
|
let d = WithDrop;
|
2020-07-27 19:00:00 -05:00
|
|
|
move || { d; yield; &mut *r }; //~ WARN unused generator that must be used
|
2018-04-27 14:41:30 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {}
|