aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide/src
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_ide/src')
-rw-r--r--crates/ra_ide/src/completion/complete_keyword.rs14
1 files changed, 7 insertions, 7 deletions
diff --git a/crates/ra_ide/src/completion/complete_keyword.rs b/crates/ra_ide/src/completion/complete_keyword.rs
index b2f621a11..3b174f916 100644
--- a/crates/ra_ide/src/completion/complete_keyword.rs
+++ b/crates/ra_ide/src/completion/complete_keyword.rs
@@ -11,14 +11,14 @@ pub(super) fn complete_use_tree_keyword(acc: &mut Completions, ctx: &CompletionC
11 let source_range = ctx.source_range(); 11 let source_range = ctx.source_range();
12 match (ctx.use_item_syntax.as_ref(), ctx.path_prefix.as_ref()) { 12 match (ctx.use_item_syntax.as_ref(), ctx.path_prefix.as_ref()) {
13 (Some(_), None) => { 13 (Some(_), None) => {
14 CompletionItem::new(CompletionKind::Keyword, source_range, "crate") 14 CompletionItem::new(CompletionKind::Keyword, source_range, "crate::")
15 .kind(CompletionItemKind::Keyword) 15 .kind(CompletionItemKind::Keyword)
16 .insert_text("crate::") 16 .insert_text("crate::")
17 .add_to(acc); 17 .add_to(acc);
18 CompletionItem::new(CompletionKind::Keyword, source_range, "self") 18 CompletionItem::new(CompletionKind::Keyword, source_range, "self")
19 .kind(CompletionItemKind::Keyword) 19 .kind(CompletionItemKind::Keyword)
20 .add_to(acc); 20 .add_to(acc);
21 CompletionItem::new(CompletionKind::Keyword, source_range, "super") 21 CompletionItem::new(CompletionKind::Keyword, source_range, "super::")
22 .kind(CompletionItemKind::Keyword) 22 .kind(CompletionItemKind::Keyword)
23 .insert_text("super::") 23 .insert_text("super::")
24 .add_to(acc); 24 .add_to(acc);
@@ -27,7 +27,7 @@ pub(super) fn complete_use_tree_keyword(acc: &mut Completions, ctx: &CompletionC
27 CompletionItem::new(CompletionKind::Keyword, source_range, "self") 27 CompletionItem::new(CompletionKind::Keyword, source_range, "self")
28 .kind(CompletionItemKind::Keyword) 28 .kind(CompletionItemKind::Keyword)
29 .add_to(acc); 29 .add_to(acc);
30 CompletionItem::new(CompletionKind::Keyword, source_range, "super") 30 CompletionItem::new(CompletionKind::Keyword, source_range, "super::")
31 .kind(CompletionItemKind::Keyword) 31 .kind(CompletionItemKind::Keyword)
32 .insert_text("super::") 32 .insert_text("super::")
33 .add_to(acc); 33 .add_to(acc);
@@ -182,9 +182,9 @@ mod tests {
182 assert_snapshot!( 182 assert_snapshot!(
183 get_keyword_completions(r"use <|>"), 183 get_keyword_completions(r"use <|>"),
184 @r###" 184 @r###"
185 kw crate 185 kw crate::
186 kw self 186 kw self
187 kw super 187 kw super::
188 "### 188 "###
189 ); 189 );
190 190
@@ -192,7 +192,7 @@ mod tests {
192 get_keyword_completions(r"use a::<|>"), 192 get_keyword_completions(r"use a::<|>"),
193 @r###" 193 @r###"
194 kw self 194 kw self
195 kw super 195 kw super::
196 "### 196 "###
197 ); 197 );
198 198
@@ -200,7 +200,7 @@ mod tests {
200 get_keyword_completions(r"use a::{b, <|>}"), 200 get_keyword_completions(r"use a::{b, <|>}"),
201 @r###" 201 @r###"
202 kw self 202 kw self
203 kw super 203 kw super::
204 "### 204 "###
205 ); 205 );
206 } 206 }