summaryrefslogtreecommitdiffstats
path: root/tests/ui/closure_context/issue-42065.rs
blob: c506600f4d931ba61605e34fe06f381293531d4b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
use std::collections::HashMap;

fn main() {
    let dict: HashMap<i32, i32> = HashMap::new();
    let debug_dump_dict = || {
        for (key, value) in dict {
            println!("{:?} - {:?}", key, value);
        }
    };
    debug_dump_dict();
    debug_dump_dict();
    //~^ ERROR use of moved value: `debug_dump_dict`
}