summary refs log tree commit diff
path: root/src/test/compile-fail/mutable-huh-vec-assign.rs
blob: 43738008ec637cb582819bad541103dacee9c25e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
// error-pattern: assigning to immutable vec content

fn main() {
    fn f(&&v: [const int]) {
        // This shouldn't be possible
        v[0] = 1
    }

    let v = [0];

    f(v);
}