summaryrefslogtreecommitdiff
path: root/src/test/ui/nll/match-on-borrowed.stderr
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/nll/match-on-borrowed.stderr')
-rw-r--r--src/test/ui/nll/match-on-borrowed.stderr26
1 files changed, 25 insertions, 1 deletions
diff --git a/src/test/ui/nll/match-on-borrowed.stderr b/src/test/ui/nll/match-on-borrowed.stderr
index cdff29d44b8..2d34dd7805d 100644
--- a/src/test/ui/nll/match-on-borrowed.stderr
+++ b/src/test/ui/nll/match-on-borrowed.stderr
@@ -1,3 +1,27 @@
+error[E0503]: cannot use `e` because it was mutably borrowed
+ --> $DIR/match-on-borrowed.rs:51:9
+ |
+LL | E::V(ref mut x, _) => x,
+ | --------- borrow of `e.0` occurs here
+...
+LL | E::V(_, r) => (), //~ ERROR
+ | ^^^^^^^^^^ use of borrowed `e.0`
+...
+LL | x;
+ | - borrow later used here
+
+error[E0503]: cannot use `*f` because it was mutably borrowed
+ --> $DIR/match-on-borrowed.rs:64:9
+ |
+LL | E::V(ref mut x, _) => x,
+ | --------- borrow of `f.0` occurs here
+...
+LL | E::V(_, r) => (), //~ ERROR
+ | ^^^^^^^^^^ use of borrowed `f.0`
+...
+LL | x;
+ | - borrow later used here
+
error[E0503]: cannot use `t` because it was mutably borrowed
--> $DIR/match-on-borrowed.rs:82:9
|
@@ -16,7 +40,7 @@ error[E0381]: use of possibly uninitialized variable: `n`
LL | match n {} //~ ERROR
| ^ use of possibly uninitialized `n`
-error: aborting due to 2 previous errors
+error: aborting due to 4 previous errors
Some errors occurred: E0381, E0503.
For more information about an error, try `rustc --explain E0381`.