]> git.lizzy.rs Git - rust.git/blob - src/test/ui/nll/issue-48623-closure.rs
Auto merge of #105121 - oli-obk:simpler-cheaper-dump_mir, r=nnethercote
[rust.git] / src / test / ui / nll / issue-48623-closure.rs
1 // run-pass
2 #![allow(path_statements)]
3 #![allow(dead_code)]
4
5 struct WithDrop;
6
7 impl Drop for WithDrop {
8     fn drop(&mut self) {}
9 }
10
11 fn reborrow_from_closure(r: &mut ()) -> &mut () {
12     let d = WithDrop;
13     (move || { d; &mut *r })()
14 }
15
16 fn main() {}