summaryrefslogtreecommitdiffstats
path: root/tests/ui/rfcs/rfc-2294-if-let-guard/guard-lifetime-1.stderr
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/rfcs/rfc-2294-if-let-guard/guard-lifetime-1.stderr')
-rw-r--r--tests/ui/rfcs/rfc-2294-if-let-guard/guard-lifetime-1.stderr15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/ui/rfcs/rfc-2294-if-let-guard/guard-lifetime-1.stderr b/tests/ui/rfcs/rfc-2294-if-let-guard/guard-lifetime-1.stderr
new file mode 100644
index 000000000..b8e1bb324
--- /dev/null
+++ b/tests/ui/rfcs/rfc-2294-if-let-guard/guard-lifetime-1.stderr
@@ -0,0 +1,15 @@
+error[E0505]: cannot move out of `x.0` because it is borrowed
+ --> $DIR/guard-lifetime-1.rs:8:14
+ |
+LL | Some(mut y) if let Some(ref z) = y => {
+ | ^^^^^
+ | |
+ | move out of `x.0` occurs here
+ | borrow of `x.0` occurs here
+LL |
+LL | let _z: &String = z;
+ | - borrow later used here
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0505`.