about summary refs log tree commit diff
path: root/tests/ui/pattern/patkind-ref-binding-issue-114896.rs
blob: f074246b78290c720e1cb39869a742f42a4d4bd4 (plain)
1
2
3
4
5
6
7
8
9
10
//@ run-rustfix
#![allow(dead_code)]

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