mirror of
https://github.com/rust-lang/rust.git
synced 2025-06-06 20:28:33 +00:00
12 lines
213 B
Rust
12 lines
213 B
Rust
![]() |
fn main() {
|
||
|
let mut is_mut @ not_mut = 42;
|
||
|
&mut is_mut;
|
||
|
&mut not_mut;
|
||
|
//~^ ERROR cannot borrow
|
||
|
|
||
|
let not_mut @ mut is_mut = 42;
|
||
|
&mut is_mut;
|
||
|
&mut not_mut;
|
||
|
//~^ ERROR cannot borrow
|
||
|
}
|