summaryrefslogtreecommitdiffstats
path: root/tests/ui/closures/2229_closure_analysis/diagnostics/mut_ref.stderr
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--tests/ui/closures/2229_closure_analysis/diagnostics/mut_ref.stderr (renamed from src/test/ui/closures/2229_closure_analysis/diagnostics/mut_ref.stderr)8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/test/ui/closures/2229_closure_analysis/diagnostics/mut_ref.stderr b/tests/ui/closures/2229_closure_analysis/diagnostics/mut_ref.stderr
index 481d7e585..95f36fc04 100644
--- a/src/test/ui/closures/2229_closure_analysis/diagnostics/mut_ref.stderr
+++ b/tests/ui/closures/2229_closure_analysis/diagnostics/mut_ref.stderr
@@ -1,14 +1,16 @@
error[E0596]: cannot borrow `**ref_mref_x` as mutable, as it is behind a `&` reference
--> $DIR/mut_ref.rs:12:13
|
-LL | let ref_mref_x = &mref_x;
- | ------- help: consider changing this to be a mutable reference: `&mut mref_x`
-LL |
LL | let c = || {
| ^^ `ref_mref_x` is a `&` reference, so the data it refers to cannot be borrowed as mutable
LL |
LL | **ref_mref_x = y;
| ------------ mutable borrow occurs due to use of `**ref_mref_x` in closure
+ |
+help: consider changing this to be a mutable reference
+ |
+LL | let ref_mref_x = &mut mref_x;
+ | ~~~~~~~~~~~
error[E0596]: cannot borrow `**mref_ref_x` as mutable, as it is behind a `&` reference
--> $DIR/mut_ref.rs:26:13