aboutsummaryrefslogtreecommitdiff
path: root/crates
diff options
context:
space:
mode:
Diffstat (limited to 'crates')
-rw-r--r--crates/assists/src/handlers/qualify_path.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/crates/assists/src/handlers/qualify_path.rs b/crates/assists/src/handlers/qualify_path.rs
index cff207889..bbbf47bef 100644
--- a/crates/assists/src/handlers/qualify_path.rs
+++ b/crates/assists/src/handlers/qualify_path.rs
@@ -1,6 +1,7 @@
1use std::collections::BTreeSet; 1use std::collections::BTreeSet;
2 2
3use syntax::{ast, AstNode, TextRange}; 3use syntax::{ast, AstNode, TextRange};
4use test_utils::mark;
4 5
5use crate::{ 6use crate::{
6 assist_context::{AssistContext, Assists}, 7 assist_context::{AssistContext, Assists},
@@ -89,6 +90,7 @@ fn qualify_path_qualifier_start(
89 segment: ast::PathSegment, 90 segment: ast::PathSegment,
90 qualifier_start: &str, 91 qualifier_start: &str,
91) { 92) {
93 mark::hit!(qualify_path_qualifier_start);
92 let group_label = GroupLabel(format!("Qualify {}", qualifier_start)); 94 let group_label = GroupLabel(format!("Qualify {}", qualifier_start));
93 for import in proposed_imports { 95 for import in proposed_imports {
94 acc.add_group( 96 acc.add_group(
@@ -111,6 +113,7 @@ fn qualify_path_unqualified_name(
111 range: TextRange, 113 range: TextRange,
112 name: &str, 114 name: &str,
113) { 115) {
116 mark::hit!(qualify_path_unqualified_name);
114 let group_label = GroupLabel(format!("Qualify {}", name)); 117 let group_label = GroupLabel(format!("Qualify {}", name));
115 for import in proposed_imports { 118 for import in proposed_imports {
116 acc.add_group( 119 acc.add_group(
@@ -132,6 +135,7 @@ fn qualify_path_trait_assoc_item(
132 segment: ast::PathSegment, 135 segment: ast::PathSegment,
133 trait_assoc_item_name: &str, 136 trait_assoc_item_name: &str,
134) { 137) {
138 mark::hit!(qualify_path_trait_assoc_item);
135 let group_label = GroupLabel(format!("Qualify {}", trait_assoc_item_name)); 139 let group_label = GroupLabel(format!("Qualify {}", trait_assoc_item_name));
136 for import in proposed_imports { 140 for import in proposed_imports {
137 acc.add_group( 141 acc.add_group(
@@ -156,6 +160,7 @@ fn qualify_path_trait_method(
156 name_ref: ast::NameRef, 160 name_ref: ast::NameRef,
157 trait_method_name: &str, 161 trait_method_name: &str,
158) { 162) {
163 mark::hit!(qualify_path_trait_method);
159 let group_label = GroupLabel(format!("Qualify {}", trait_method_name)); 164 let group_label = GroupLabel(format!("Qualify {}", trait_method_name));
160 for import in proposed_imports { 165 for import in proposed_imports {
161 acc.add_group( 166 acc.add_group(
@@ -178,6 +183,7 @@ mod tests {
178 use crate::tests::{check_assist, check_assist_not_applicable, check_assist_target}; 183 use crate::tests::{check_assist, check_assist_not_applicable, check_assist_target};
179 #[test] 184 #[test]
180 fn applicable_when_found_an_import_partial() { 185 fn applicable_when_found_an_import_partial() {
186 mark::check!(qualify_path_unqualified_name);
181 check_assist( 187 check_assist(
182 qualify_path, 188 qualify_path,
183 r" 189 r"
@@ -469,6 +475,7 @@ fn main() {
469 475
470 #[test] 476 #[test]
471 fn associated_struct_const() { 477 fn associated_struct_const() {
478 mark::check!(qualify_path_qualifier_start);
472 check_assist( 479 check_assist(
473 qualify_path, 480 qualify_path,
474 r" 481 r"
@@ -569,6 +576,7 @@ fn main() {
569 576
570 #[test] 577 #[test]
571 fn associated_trait_const() { 578 fn associated_trait_const() {
579 mark::check!(qualify_path_trait_assoc_item);
572 check_assist( 580 check_assist(
573 qualify_path, 581 qualify_path,
574 r" 582 r"
@@ -638,6 +646,7 @@ fn main() {
638 646
639 #[test] 647 #[test]
640 fn trait_method() { 648 fn trait_method() {
649 mark::check!(qualify_path_trait_method);
641 check_assist( 650 check_assist(
642 qualify_path, 651 qualify_path,
643 r" 652 r"