13 lines
187 B
Rust
13 lines
187 B
Rust
// 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);
|
|
}
|