diff options
Diffstat (limited to '')
-rw-r--r-- | tests/ui/pattern/issue-114896.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/ui/pattern/issue-114896.rs b/tests/ui/pattern/issue-114896.rs new file mode 100644 index 000000000..cde37f658 --- /dev/null +++ b/tests/ui/pattern/issue-114896.rs @@ -0,0 +1,7 @@ +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 + } +} |