rust/tests/ui/pattern/patkind-ref-binding-issue-114896.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

11 lines
201 B
Rust
Raw Permalink Normal View History

//@ run-rustfix
#![allow(dead_code)]
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
}
}