about summary refs log tree commit diff
path: root/src/test/compile-fail/mutable-huh-vec-assign.rs
blob: 3a94c6d9b17d9634fd5f3f804f8c4e2ccb657e95 (plain)
1
2
3
4
5
6
7
8
9
10
fn main() {
    fn f(&&v: [const int]/~) {
        // This shouldn't be possible
        v[0] = 1 //! ERROR assigning to const vec content
    }

    let v = [0]/~;

    f(v);
}