]> git.lizzy.rs Git - rust.git/blob - src/test/ui/suggestions/option-content-move2.rs
Rollup merge of #90420 - GuillaumeGomez:rustdoc-internals-feature, r=camelid
[rust.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() {}