// Regresion test for issue 7660
// rvalue lifetime too short when equivalent `match` works
-use std::hashmap::HashMap;
+extern crate collections;
+
+use std::collections::HashMap;
struct A(int, int);
let mut m: HashMap<int, A> = HashMap::new();
m.insert(1, A(0, 0));
- let A(ref _a, ref _b) = *m.get(&1);
- let (a, b) = match *m.get(&1) { A(ref _a, ref _b) => (_a, _b) };
+ let A(ref _a, ref _b) = m[1];
+ let (a, b) = match m[1] { A(ref _a, ref _b) => (_a, _b) };
}