2024-03-18 14:44:26 +08:00
|
|
|
//@ run-rustfix
|
|
|
|
|
#![allow(dead_code)]
|
|
|
|
|
|
2023-09-06 11:33:03 +08:00
|
|
|
fn main() {
|
|
|
|
|
fn x(a: &char) {
|
2024-03-18 14:44:26 +08:00
|
|
|
let &(mut b) = a;
|
2023-09-06 11:33:03 +08:00
|
|
|
b.make_ascii_uppercase();
|
2025-04-05 19:19:56 +03:00
|
|
|
//~^ ERROR cannot borrow `b` as mutable, as it is not declared as mutable
|
2023-09-06 11:33:03 +08:00
|
|
|
}
|
|
|
|
|
}
|