mirror of
https://github.com/rust-lang/rust.git
synced 2024-10-31 22:41:50 +00:00
17 lines
306 B
Rust
17 lines
306 B
Rust
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() {}
|