]> git.lizzy.rs Git - rust.git/blob - tests/ui/moves/issue-75904-move-closure-loop.rs
Rollup merge of #106446 - bzEq:fix-unwind-lsda, r=Amanieu
[rust.git] / tests / ui / moves / issue-75904-move-closure-loop.rs
1 // Regression test for issue #75904
2 // Tests that we point at an expression
3 // that required the upvar to be moved, rather than just borrowed.
4
5 struct NotCopy;
6
7 fn main() {
8     let mut a = NotCopy;
9     loop {
10         || { //~ ERROR use of moved value
11             &mut a;
12             a;
13         };
14     }
15 }