]> git.lizzy.rs Git - rust.git/blob - tests/ui/nll/issue-48623-generator.rs
Auto merge of #101138 - Rejyr:diagnostic-migration-rustc-lint-pt2, r=davidtwco
[rust.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() {}