rust/tests/ui/pattern/issue-114896.rs
2023-09-07 11:07:33 +08:00

8 lines
163 B
Rust

fn main() {
fn x(a: &char) {
let &b = a;
b.make_ascii_uppercase();
//~^ cannot borrow `b` as mutable, as it is not declared as mutable
}
}