]> git.proxmox.com Git - rustc.git/blob - src/test/ui/suggestions/option-content-move2.rs
New upstream version 1.41.1+dfsg1
[rustc.git] / src / test / ui / suggestions / option-content-move2.rs
1 struct NotCopyable;
2
3 fn func<F: FnMut() -> H, H: FnMut()>(_: F) {}
4
5 fn parse() {
6 let mut var = None;
7 func(|| {
8 // Shouldn't suggest `move ||.as_ref()` here
9 move || {
10 //~^ ERROR: cannot move out of `var`
11 var = Some(NotCopyable);
12 }
13 });
14 }
15
16 fn main() {}