aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide/src/completion
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_ide/src/completion')
-rw-r--r--crates/ra_ide/src/completion/complete_unqualified_path.rs1
-rw-r--r--crates/ra_ide/src/completion/completion_context.rs2
2 files changed, 3 insertions, 0 deletions
diff --git a/crates/ra_ide/src/completion/complete_unqualified_path.rs b/crates/ra_ide/src/completion/complete_unqualified_path.rs
index 417a92001..68032c37e 100644
--- a/crates/ra_ide/src/completion/complete_unqualified_path.rs
+++ b/crates/ra_ide/src/completion/complete_unqualified_path.rs
@@ -299,6 +299,7 @@ mod tests {
299 299
300 #[test] 300 #[test]
301 fn completes_bindings_from_for_with_in_prefix() { 301 fn completes_bindings_from_for_with_in_prefix() {
302 mark::check!(completes_bindings_from_for_with_in_prefix);
302 assert_debug_snapshot!( 303 assert_debug_snapshot!(
303 do_reference_completion( 304 do_reference_completion(
304 r" 305 r"
diff --git a/crates/ra_ide/src/completion/completion_context.rs b/crates/ra_ide/src/completion/completion_context.rs
index e8bf07d6e..c4646b727 100644
--- a/crates/ra_ide/src/completion/completion_context.rs
+++ b/crates/ra_ide/src/completion/completion_context.rs
@@ -12,6 +12,7 @@ use ra_syntax::{
12use ra_text_edit::Indel; 12use ra_text_edit::Indel;
13 13
14use crate::{call_info::ActiveParameter, completion::CompletionConfig, FilePosition}; 14use crate::{call_info::ActiveParameter, completion::CompletionConfig, FilePosition};
15use test_utils::mark;
15 16
16/// `CompletionContext` is created early during completion to figure out, where 17/// `CompletionContext` is created early during completion to figure out, where
17/// exactly is the cursor, syntax-wise. 18/// exactly is the cursor, syntax-wise.
@@ -174,6 +175,7 @@ impl<'a> CompletionContext<'a> {
174 if self.token.kind().is_keyword() 175 if self.token.kind().is_keyword()
175 && self.offset == self.original_token.text_range().end() 176 && self.offset == self.original_token.text_range().end()
176 { 177 {
178 mark::hit!(completes_bindings_from_for_with_in_prefix);
177 TextRange::empty(self.original_token.text_range().start()) 179 TextRange::empty(self.original_token.text_range().start())
178 } else { 180 } else {
179 TextRange::empty(self.offset) 181 TextRange::empty(self.offset)