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