1 // When mutably indexing a type that implements `Index` but not `IndexMut`, a
2 // special 'help' message is added to the output.
6 use std::collections::HashMap;
8 let mut map = HashMap::new();
9 map.insert("peter", "23".to_string());
11 map["peter"].clear(); //~ ERROR
12 map["peter"] = "0".to_string(); //~ ERROR
13 let _ = &mut map["peter"]; //~ ERROR