mirror of
https://github.com/rust-lang/rust
synced 2024-11-05 20:45:15 +00:00
17 lines
322 B
Rust
17 lines
322 B
Rust
use std::collections::HashMap;
|
|
struct X(usize);
|
|
struct Y {
|
|
v: u32
|
|
}
|
|
|
|
fn main() {
|
|
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
|
|
}
|
|
}
|