]> git.lizzy.rs Git - rust.git/blob - src/test/ui/nll/issue-48623-generator.rs
Auto merge of #105121 - oli-obk:simpler-cheaper-dump_mir, r=nnethercote
[rust.git] / src / test / 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() {}