rust/tests/ui/suggestions/option-content-move2.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

17 lines
306 B
Rust
Raw Normal View History

2019-12-11 14:04:29 +00:00
struct NotCopyable;
fn func<F: FnMut() -> H, H: FnMut()>(_: F) {}
fn parse() {
let mut var = None;
func(|| {
// Shouldn't suggest `move ||.as_ref()` here
move || {
//~^ ERROR: cannot move out of `var`
var = Some(NotCopyable);
}
});
}
fn main() {}