blob: 6641a0376c6aecabba634a7630bb9ad61bdb290f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
// Regression test for issue #75904
// Tests that we point at an expression
// that required the upvar to be moved, rather than just borrowed.
struct NotCopy;
fn main() {
let mut a = NotCopy;
loop {
|| { //~ ERROR use of moved value
&mut a;
a;
};
}
}
|