blob: db8127d0854d2587052dd515dd7ef0b2cb5735bc (
plain)
1
2
3
4
5
6
7
8
9
|
fn main() {
let mut a = [1, 2, 3, 4];
let t = match a {
[1, 2, ..tail] => tail,
_ => std::util::unreachable()
};
a[0] = 0; //~ ERROR cannot assign to `a[]` because it is borrowed
t[0];
}
|