mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-02 11:44:28 +00:00
20 lines
359 B
Rust
20 lines
359 B
Rust
use std::collections::HashMap;
|
|
struct X(usize);
|
|
struct Y {
|
|
v: u32,
|
|
}
|
|
|
|
fn main() {
|
|
let _ = || {
|
|
let mut buzz = HashMap::new();
|
|
buzz.insert("a", Y { v: 0 });
|
|
|
|
for mut t in buzz.values() {
|
|
//~^ HELP
|
|
//~| SUGGESTION values_mut()
|
|
t.v += 1;
|
|
//~^ ERROR cannot assign
|
|
}
|
|
};
|
|
}
|