]> git.lizzy.rs Git - rust.git/commitdiff
Added remove this semicolon test
authorivan770 <leshenko.ivan770@gmail.com>
Sat, 12 Dec 2020 11:50:11 +0000 (13:50 +0200)
committerivan770 <leshenko.ivan770@gmail.com>
Sat, 12 Dec 2020 11:50:11 +0000 (13:50 +0200)
crates/hir_ty/src/diagnostics.rs

index e59487e544b869e6d3992da8075e7da453d23bbc..1c72f766ea42af5334700197009d6b080bc6a6a3 100644 (file)
@@ -624,4 +624,14 @@ fn break_outside_of_loop() {
 "#,
         );
     }
+
+    #[test]
+    fn missing_semicolon() {
+        check_diagnostics(
+            r#"
+                fn test() -> i32 { 123; }
+                                 //^^^ Remove this semicolon
+            "#,
+        );
+    }
 }