summaryrefslogtreecommitdiffstats
path: root/tests/ui/borrowck/many-mutable-borrows.rs
blob: 3e6ea9d25d9105660ca61aa019f0b30b06a7c940 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
fn main() {
    let v = Vec::new(); //~ ERROR cannot borrow `v` as mutable, as it is not declared as mutable
    v.push(0);
    v.push(0);
    v.push(0);
    v.push(0);
    v.push(0);
    v.push(0);
    v.push(0);
    v.push(0);
    v.push(0);
    v.push(0);
    v.push(0);
    v.push(0);
    v.push(0);
    v.push(0);
    v.push(0);
}