From f7f4f366aca691ef848824e1738b014cb7028cf0 Mon Sep 17 00:00:00 2001 From: ivan770 Date: Sat, 12 Dec 2020 13:50:11 +0200 Subject: Added remove this semicolon test --- crates/hir_ty/src/diagnostics.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'crates/hir_ty/src/diagnostics.rs') diff --git a/crates/hir_ty/src/diagnostics.rs b/crates/hir_ty/src/diagnostics.rs index e59487e54..1c72f766e 100644 --- a/crates/hir_ty/src/diagnostics.rs +++ b/crates/hir_ty/src/diagnostics.rs @@ -624,4 +624,14 @@ fn foo() { break; } "#, ); } + + #[test] + fn missing_semicolon() { + check_diagnostics( + r#" + fn test() -> i32 { 123; } + //^^^ Remove this semicolon + "#, + ); + } } -- cgit v1.2.3