mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-04 04:39:16 +00:00
12 lines
224 B
Rust
12 lines
224 B
Rust
fn main() {
|
|
let a0 = 0;
|
|
let f = 1;
|
|
let mut a1 = &a0;
|
|
match (&a1,) {
|
|
(&ref b0,) => {
|
|
a1 = &f; //~ ERROR cannot assign to `a1` because it is borrowed
|
|
drop(b0);
|
|
}
|
|
}
|
|
}
|