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