summaryrefslogtreecommitdiffstats
path: root/src/test/ui/hashmap/hashmap-lifetimes.rs
blob: 295bf3b0e663156cdb0d83ed5456e9015def9fd5 (plain)
1
2
3
4
5
6
7
8
fn main() {
    let mut my_stuff = std::collections::HashMap::new();
    my_stuff.insert(0, 42);

    let mut it = my_stuff.iter();
    my_stuff.insert(1, 43); //~ ERROR cannot borrow
    it;
}