rust/tests/ui/pattern/issue-114896.rs

8 lines
163 B
Rust
Raw Normal View History

2023-09-05 22:33:03 -05:00
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
}
}