File tree Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -311,12 +311,14 @@ pub(crate) fn compute_score(
311
311
name : & str ,
312
312
) -> Option < CompletionScore > {
313
313
let ( active_name, active_type) = if let Some ( record_field) = & ctx. record_field_syntax {
314
+ tested_by ! ( test_struct_field_completion_in_record_lit) ;
314
315
let ( struct_field, _local) = ctx. sema . resolve_record_field ( record_field) ?;
315
316
(
316
317
struct_field. name ( ctx. db ) . to_string ( ) ,
317
318
struct_field. signature_ty ( ctx. db ) . display ( ctx. db ) . to_string ( ) ,
318
319
)
319
320
} else if let Some ( active_parameter) = & ctx. active_parameter {
321
+ tested_by ! ( test_struct_field_completion_in_func_call) ;
320
322
( active_parameter. name . clone ( ) , active_parameter. ty . clone ( ) )
321
323
} else {
322
324
return None ;
@@ -1072,6 +1074,7 @@ mod tests {
1072
1074
1073
1075
#[ test]
1074
1076
fn test_struct_field_completion_in_func_call ( ) {
1077
+ covers ! ( test_struct_field_completion_in_func_call) ;
1075
1078
assert_debug_snapshot ! (
1076
1079
do_reference_completion(
1077
1080
r"
@@ -1161,6 +1164,7 @@ mod tests {
1161
1164
1162
1165
#[ test]
1163
1166
fn test_struct_field_completion_in_record_lit ( ) {
1167
+ covers ! ( test_struct_field_completion_in_func_call) ;
1164
1168
assert_debug_snapshot ! (
1165
1169
do_reference_completion(
1166
1170
r"
Original file line number Diff line number Diff line change @@ -9,4 +9,6 @@ test_utils::marks!(
9
9
search_filters_by_range
10
10
dont_insert_macro_call_parens_unncessary
11
11
self_fulfilling_completion
12
+ test_struct_field_completion_in_func_call
13
+ test_struct_field_completion_in_record_lit
12
14
) ;
You can’t perform that action at this time.
0 commit comments