aboutsummaryrefslogtreecommitdiff
path: root/crates/ide_assists/src/handlers/fill_match_arms.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ide_assists/src/handlers/fill_match_arms.rs')
-rw-r--r--crates/ide_assists/src/handlers/fill_match_arms.rs20
1 files changed, 20 insertions, 0 deletions
diff --git a/crates/ide_assists/src/handlers/fill_match_arms.rs b/crates/ide_assists/src/handlers/fill_match_arms.rs
index 711ef2393..3d2cd739a 100644
--- a/crates/ide_assists/src/handlers/fill_match_arms.rs
+++ b/crates/ide_assists/src/handlers/fill_match_arms.rs
@@ -1096,4 +1096,24 @@ fn foo(t: bool) {
1096}"#, 1096}"#,
1097 ); 1097 );
1098 } 1098 }
1099
1100 #[test]
1101 fn does_not_add_extra_comma() {
1102 check_assist(
1103 fill_match_arms,
1104 r#"
1105fn foo(t: bool) {
1106 match $0t {
1107 true => 1 + 2,
1108 }
1109}"#,
1110 r#"
1111fn foo(t: bool) {
1112 match t {
1113 true => 1 + 2,
1114 $0false => todo!(),
1115 }
1116}"#,
1117 );
1118 }
1099} 1119}