rust/tests/ui/pattern/bindings-after-at/nested-binding-modes-mut.rs

12 lines
213 B
Rust
Raw Normal View History

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
}