]> git.proxmox.com Git - rustc.git/blame - src/test/ui/moves/issue-75904-move-closure-loop.rs
New upstream version 1.67.1+dfsg1
[rustc.git] / src / test / ui / moves / issue-75904-move-closure-loop.rs
CommitLineData
1b1a35ee
XL
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
5struct NotCopy;
6
7fn main() {
8 let mut a = NotCopy;
9 loop {
10 || { //~ ERROR use of moved value
11 &mut a;
12 a;
13 };
14 }
15}