mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-01 06:51:58 +00:00
14 lines
327 B
Rust
14 lines
327 B
Rust
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`
|
|
}
|