rust/tests/ui/pattern/patkind-ref-binding-issue-1...

11 lines
207 B
Rust

//@ run-rustfix
#![allow(dead_code)]
fn main() {
fn x(a: &char) {
let &(mut b) = a;
b.make_ascii_uppercase();
//~^ cannot borrow `b` as mutable, as it is not declared as mutable
}
}