]> git.proxmox.com Git - rustc.git/blob - src/test/run-pass/nll/issue-48623-generator.rs
New upstream version 1.33.0+dfsg1
[rustc.git] / src / test / run-pass / nll / issue-48623-generator.rs
1 // run-pass
2 #![allow(path_statements)]
3 #![allow(dead_code)]
4
5 #![feature(nll)]
6 #![feature(generators, generator_trait)]
7
8 struct WithDrop;
9
10 impl Drop for WithDrop {
11 fn drop(&mut self) {}
12 }
13
14 fn reborrow_from_generator(r: &mut ()) {
15 let d = WithDrop;
16 move || { d; yield; &mut *r };
17 }
18
19 fn main() {}