about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--tests/ui/binding/issue-53114-borrow-checks.rs4
-rw-r--r--tests/ui/uninhabited/diverging-guard.rs10
2 files changed, 12 insertions, 2 deletions
diff --git a/tests/ui/binding/issue-53114-borrow-checks.rs b/tests/ui/binding/issue-53114-borrow-checks.rs
index 8b4ebe7265a..6ab1f4f47df 100644
--- a/tests/ui/binding/issue-53114-borrow-checks.rs
+++ b/tests/ui/binding/issue-53114-borrow-checks.rs
@@ -20,7 +20,7 @@ fn let_wild_gets_moved_expr() {
 fn match_moved_expr_to_wild() {
     let m = M;
     drop(m);
-    match m { _ => { } } // #53114: should eventually be accepted too
+    match m { _ => { } } // #53114: accepted too
 
     let mm = (M, M); // variation on above with `_` in substructure
     match mm { (_x, _) => { } }
@@ -31,7 +31,7 @@ fn match_moved_expr_to_wild() {
 fn if_let_moved_expr_to_wild() {
     let m = M;
     drop(m);
-    if let _ = m { } // #53114: should eventually be accepted too
+    if let _ = m { } // #53114: accepted too
 
     let mm = (M, M); // variation on above with `_` in substructure
     if let (_x, _) = mm { }
diff --git a/tests/ui/uninhabited/diverging-guard.rs b/tests/ui/uninhabited/diverging-guard.rs
new file mode 100644
index 00000000000..7d57cd51c2d
--- /dev/null
+++ b/tests/ui/uninhabited/diverging-guard.rs
@@ -0,0 +1,10 @@
+// check-pass
+
+enum Void {}
+
+fn main() {
+    let x: Void;
+    match x {
+        _ if { loop {} } => (),
+    }
+}