rust/tests/ui/pattern/bindings-after-at/nested-binding-mode-lint.rs
2024-02-16 20:02:50 +00:00

13 lines
184 B
Rust

//@ check-pass
#![deny(unused_mut)]
fn main() {
let mut is_mut @ not_mut = 42;
&mut is_mut;
&not_mut;
let not_mut @ mut is_mut = 42;
&mut is_mut;
&not_mut;
}