]> git.lizzy.rs Git - rust.git/blob - tests/ui/unboxed-closures/unboxed-closures-infer-fnonce-move-call-twice.rs
Auto merge of #107054 - petrochenkov:effvisdoc3, r=GuillaumeGomez
[rust.git] / tests / ui / unboxed-closures / unboxed-closures-infer-fnonce-move-call-twice.rs
1 // Test that we are able to infer a suitable kind for this closure
2 // that is just called (`FnMut`).
3
4 use std::mem;
5
6 fn main() {
7     let mut counter: Vec<i32> = Vec::new();
8     let tick = move || mem::drop(counter);
9     tick();
10     tick(); //~ ERROR use of moved value: `tick`
11 }