mirror of
https://github.com/rust-lang/rust.git
synced 2024-10-31 22:41:50 +00:00
5 lines
161 B
Rust
5 lines
161 B
Rust
|
fn main() {
|
||
|
let mut vec = vec![0u32; 420];
|
||
|
vec[vec.len() - 1] = 123; //~ ERROR cannot borrow `vec` as immutable because it is also borrowed as mutable
|
||
|
}
|