Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/ide-completion/src/render/function.rs')
-rw-r--r--crates/ide-completion/src/render/function.rs19
1 files changed, 19 insertions, 0 deletions
diff --git a/crates/ide-completion/src/render/function.rs b/crates/ide-completion/src/render/function.rs
index c690ccfdc5..ea228fdd60 100644
--- a/crates/ide-completion/src/render/function.rs
+++ b/crates/ide-completion/src/render/function.rs
@@ -952,4 +952,23 @@ fn bar() {
"#,
);
}
+
+ #[test]
+ fn no_semicolon_in_match() {
+ check_edit(
+ r#"foo"#,
+ r#"
+fn foo() {}
+fn bar() {
+ match fo$0 {}
+}
+"#,
+ r#"
+fn foo() {}
+fn bar() {
+ match foo()$0 {}
+}
+"#,
+ );
+ }
}