]> git.lizzy.rs Git - rust.git/blob - tests/ui/suggestions/option-content-move2.rs
Rollup merge of #107255 - lcnr:implied-b-hr, r=oli-obk
[rust.git] / tests / 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() {}