@@ -50,6 +50,7 @@ pub(crate) fn add_missing_match_arms(acc: &mut Assists, ctx: &AssistContext) ->
50
50
51
51
let cursor_in_range = target_range. contains_range ( ctx. selection_trimmed ( ) ) ;
52
52
if !cursor_in_range {
53
+ cov_mark:: hit!( not_applicable_outside_of_range_right) ;
53
54
return None ;
54
55
}
55
56
} else {
@@ -199,6 +200,7 @@ fn cursor_at_trivial_match_arm_list(
199
200
) -> Option < ( ) > {
200
201
// match x { $0 }
201
202
if match_arm_list. arms ( ) . next ( ) == None {
203
+ cov_mark:: hit!( add_missing_match_arms_empty_body) ;
202
204
return Some ( ( ) ) ;
203
205
}
204
206
@@ -207,6 +209,7 @@ fn cursor_at_trivial_match_arm_list(
207
209
let arm = wild_pat. syntax ( ) . parent ( ) . and_then ( ast:: MatchArm :: cast) ?;
208
210
let arm_match_expr = arm. syntax ( ) . ancestors ( ) . nth ( 2 ) . and_then ( ast:: MatchExpr :: cast) ?;
209
211
if arm_match_expr == * match_expr {
212
+ cov_mark:: hit!( add_missing_match_arms_trivial_arm) ;
210
213
return Some ( ( ) ) ;
211
214
}
212
215
@@ -360,6 +363,7 @@ fn foo(a: A) {
360
363
361
364
#[ test]
362
365
fn not_applicable_outside_of_range_right ( ) {
366
+ cov_mark:: check!( not_applicable_outside_of_range_right) ;
363
367
check_assist_not_applicable (
364
368
add_missing_match_arms,
365
369
r#"
@@ -651,6 +655,7 @@ fn main() {
651
655
652
656
#[ test]
653
657
fn add_missing_match_arms_empty_body ( ) {
658
+ cov_mark:: check!( add_missing_match_arms_empty_body) ;
654
659
check_assist (
655
660
add_missing_match_arms,
656
661
r#"
@@ -954,6 +959,7 @@ fn main() {
954
959
955
960
#[ test]
956
961
fn add_missing_match_arms_trivial_arm ( ) {
962
+ cov_mark:: check!( add_missing_match_arms_trivial_arm) ;
957
963
check_assist (
958
964
add_missing_match_arms,
959
965
r#"
0 commit comments