aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--crates/ra_ide_api/src/completion/completion_item.rs12
-rw-r--r--crates/ra_ide_api/src/completion/snapshots/completion_item__bindings_from_for.snap22
-rw-r--r--crates/ra_ide_api/src/completion/snapshots/completion_item__bindings_from_if_let.snap32
-rw-r--r--crates/ra_ide_api/src/completion/snapshots/completion_item__bindings_from_let.snap32
-rw-r--r--crates/ra_ide_api/src/completion/snapshots/completion_item__completes_break_and_continue_in_loops1.snap72
-rw-r--r--crates/ra_ide_api/src/completion/snapshots/completion_item__completes_break_and_continue_in_loops2.snap52
-rw-r--r--crates/ra_ide_api/src/completion/snapshots/completion_item__completes_prelude.snap32
-rw-r--r--crates/ra_ide_api/src/completion/snapshots/completion_item__completes_use_paths_across_crates.snap12
-rw-r--r--crates/ra_ide_api/src/completion/snapshots/completion_item__deeply_nested_use_tree.snap12
-rw-r--r--crates/ra_ide_api/src/completion/snapshots/completion_item__dont_add_semi_after_return_if_not_a_statement.snap52
-rw-r--r--crates/ra_ide_api/src/completion/snapshots/completion_item__dont_render_function_parens_if_already_call.snap22
-rw-r--r--crates/ra_ide_api/src/completion/snapshots/completion_item__dont_render_function_parens_if_already_call_assoc_fn.snap12
-rw-r--r--crates/ra_ide_api/src/completion/snapshots/completion_item__dont_render_function_parens_in_use_item.snap12
-rw-r--r--crates/ra_ide_api/src/completion/snapshots/completion_item__dont_show_both_completions_for_shadowing.snap22
-rw-r--r--crates/ra_ide_api/src/completion/snapshots/completion_item__enum_variant.snap22
-rw-r--r--crates/ra_ide_api/src/completion/snapshots/completion_item__enum_variant_with_details.snap32
-rw-r--r--crates/ra_ide_api/src/completion/snapshots/completion_item__extern_prelude.snap12
-rw-r--r--crates/ra_ide_api/src/completion/snapshots/completion_item__generic_params.snap22
-rw-r--r--crates/ra_ide_api/src/completion/snapshots/completion_item__generic_params_in_struct.snap22
-rw-r--r--crates/ra_ide_api/src/completion/snapshots/completion_item__inserts_parens_for_function_calls1.snap22
-rw-r--r--crates/ra_ide_api/src/completion/snapshots/completion_item__inserts_parens_for_function_calls2.snap22
-rw-r--r--crates/ra_ide_api/src/completion/snapshots/completion_item__inserts_parens_for_function_calls3.snap12
-rw-r--r--crates/ra_ide_api/src/completion/snapshots/completion_item__keywords_in_function1.snap52
-rw-r--r--crates/ra_ide_api/src/completion/snapshots/completion_item__keywords_in_function2.snap72
-rw-r--r--crates/ra_ide_api/src/completion/snapshots/completion_item__keywords_in_function3.snap52
-rw-r--r--crates/ra_ide_api/src/completion/snapshots/completion_item__keywords_in_function4.snap52
-rw-r--r--crates/ra_ide_api/src/completion/snapshots/completion_item__keywords_in_use_stmt1.snap32
-rw-r--r--crates/ra_ide_api/src/completion/snapshots/completion_item__keywords_in_use_stmt2.snap22
-rw-r--r--crates/ra_ide_api/src/completion/snapshots/completion_item__keywords_in_use_stmt3.snap22
-rw-r--r--crates/ra_ide_api/src/completion/snapshots/completion_item__last_return_in_block_has_semi1.snap52
-rw-r--r--crates/ra_ide_api/src/completion/snapshots/completion_item__last_return_in_block_has_semi2.snap52
-rw-r--r--crates/ra_ide_api/src/completion/snapshots/completion_item__method_attr_filtering.snap12
-rw-r--r--crates/ra_ide_api/src/completion/snapshots/completion_item__method_completion.snap12
-rw-r--r--crates/ra_ide_api/src/completion/snapshots/completion_item__mod_with_docs.snap12
-rw-r--r--crates/ra_ide_api/src/completion/snapshots/completion_item__module_items.snap32
-rw-r--r--crates/ra_ide_api/src/completion/snapshots/completion_item__module_items_in_nested_modules.snap22
-rw-r--r--crates/ra_ide_api/src/completion/snapshots/completion_item__nested_use_tree.snap22
-rw-r--r--crates/ra_ide_api/src/completion/snapshots/completion_item__no_semi_after_break_continue_in_expr.snap72
-rw-r--r--crates/ra_ide_api/src/completion/snapshots/completion_item__param_completion_last_param.snap12
-rw-r--r--crates/ra_ide_api/src/completion/snapshots/completion_item__param_completion_nth_param.snap12
-rw-r--r--crates/ra_ide_api/src/completion/snapshots/completion_item__param_completion_trait_param.snap12
-rw-r--r--crates/ra_ide_api/src/completion/snapshots/completion_item__postfix_completion_works_for_trivial_path_expression.snap72
-rw-r--r--crates/ra_ide_api/src/completion/snapshots/completion_item__return_type.snap22
-rw-r--r--crates/ra_ide_api/src/completion/snapshots/completion_item__self_in_methods.snap22
-rw-r--r--crates/ra_ide_api/src/completion/snapshots/completion_item__snippets_in_expressions.snap22
-rw-r--r--crates/ra_ide_api/src/completion/snapshots/completion_item__snippets_in_items.snap22
-rw-r--r--crates/ra_ide_api/src/completion/snapshots/completion_item__struct_associated_const.snap12
-rw-r--r--crates/ra_ide_api/src/completion/snapshots/completion_item__struct_associated_method.snap12
-rw-r--r--crates/ra_ide_api/src/completion/snapshots/completion_item__struct_associated_type.snap12
-rw-r--r--crates/ra_ide_api/src/completion/snapshots/completion_item__struct_field_completion.snap12
-rw-r--r--crates/ra_ide_api/src/completion/snapshots/completion_item__struct_field_completion_autoderef.snap22
-rw-r--r--crates/ra_ide_api/src/completion/snapshots/completion_item__struct_field_completion_self.snap22
-rw-r--r--crates/ra_ide_api/src/completion/snapshots/completion_item__tuple_field_completion.snap22
-rw-r--r--crates/ra_ide_api/src/completion/snapshots/completion_item__use_item_starting_with_crate.snap22
-rw-r--r--crates/ra_ide_api/src/completion/snapshots/completion_item__use_item_starting_with_self.snap12
55 files changed, 339 insertions, 1161 deletions
diff --git a/crates/ra_ide_api/src/completion/completion_item.rs b/crates/ra_ide_api/src/completion/completion_item.rs
index 9aa9768d1..95bdd59b4 100644
--- a/crates/ra_ide_api/src/completion/completion_item.rs
+++ b/crates/ra_ide_api/src/completion/completion_item.rs
@@ -52,12 +52,18 @@ pub struct CompletionItem {
52 documentation: Option<Documentation>, 52 documentation: Option<Documentation>,
53} 53}
54 54
55// We use custom debug for CompletionItem to make `insta`'s diffs more readable.
55impl fmt::Debug for CompletionItem { 56impl fmt::Debug for CompletionItem {
56 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { 57 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
57 let mut s = f.debug_struct("CompletionItem"); 58 let mut s = f.debug_struct("CompletionItem");
58 s.field("label", &self.label()) 59 s.field("label", &self.label()).field("source_range", &self.source_range());
59 .field("source_range", &self.source_range()) 60 if self.text_edit().as_atoms().len() == 1 {
60 .field("text_edit", &self.text_edit); 61 let atom = &self.text_edit().as_atoms()[0];
62 s.field("delete", &atom.delete);
63 s.field("insert", &atom.insert);
64 } else {
65 s.field("text_edit", &self.text_edit);
66 }
61 if let Some(kind) = self.kind().as_ref() { 67 if let Some(kind) = self.kind().as_ref() {
62 s.field("kind", kind); 68 s.field("kind", kind);
63 } 69 }
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__bindings_from_for.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__bindings_from_for.snap
index e6e389fbd..bd7f99f71 100644
--- a/crates/ra_ide_api/src/completion/snapshots/completion_item__bindings_from_for.snap
+++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__bindings_from_for.snap
@@ -1,5 +1,5 @@
1--- 1---
2created: "2019-02-18T09:10:52.089782502Z" 2created: "2019-02-18T09:22:24.132341107Z"
3creator: [email protected] 3creator: [email protected]
4source: crates/ra_ide_api/src/completion/completion_item.rs 4source: crates/ra_ide_api/src/completion/completion_item.rs
5expression: kind_completions 5expression: kind_completions
@@ -8,28 +8,16 @@ expression: kind_completions
8 CompletionItem { 8 CompletionItem {
9 label: "quux", 9 label: "quux",
10 source_range: [83; 83), 10 source_range: [83; 83),
11 text_edit: TextEdit { 11 delete: [83; 83),
12 atoms: [ 12 insert: "quux()$0",
13 AtomTextEdit {
14 delete: [83; 83),
15 insert: "quux()$0"
16 }
17 ]
18 },
19 kind: Function, 13 kind: Function,
20 detail: "fn quux()" 14 detail: "fn quux()"
21 }, 15 },
22 CompletionItem { 16 CompletionItem {
23 label: "x", 17 label: "x",
24 source_range: [83; 83), 18 source_range: [83; 83),
25 text_edit: TextEdit { 19 delete: [83; 83),
26 atoms: [ 20 insert: "x",
27 AtomTextEdit {
28 delete: [83; 83),
29 insert: "x"
30 }
31 ]
32 },
33 kind: Binding 21 kind: Binding
34 } 22 }
35] 23]
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__bindings_from_if_let.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__bindings_from_if_let.snap
index badaed8fe..3b374c4de 100644
--- a/crates/ra_ide_api/src/completion/snapshots/completion_item__bindings_from_if_let.snap
+++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__bindings_from_if_let.snap
@@ -1,5 +1,5 @@
1--- 1---
2created: "2019-02-18T09:10:52.092577354Z" 2created: "2019-02-18T09:22:24.126809445Z"
3creator: [email protected] 3creator: [email protected]
4source: crates/ra_ide_api/src/completion/completion_item.rs 4source: crates/ra_ide_api/src/completion/completion_item.rs
5expression: kind_completions 5expression: kind_completions
@@ -8,40 +8,22 @@ expression: kind_completions
8 CompletionItem { 8 CompletionItem {
9 label: "a", 9 label: "a",
10 source_range: [214; 214), 10 source_range: [214; 214),
11 text_edit: TextEdit { 11 delete: [214; 214),
12 atoms: [ 12 insert: "a",
13 AtomTextEdit {
14 delete: [214; 214),
15 insert: "a"
16 }
17 ]
18 },
19 kind: Binding 13 kind: Binding
20 }, 14 },
21 CompletionItem { 15 CompletionItem {
22 label: "b", 16 label: "b",
23 source_range: [214; 214), 17 source_range: [214; 214),
24 text_edit: TextEdit { 18 delete: [214; 214),
25 atoms: [ 19 insert: "b",
26 AtomTextEdit {
27 delete: [214; 214),
28 insert: "b"
29 }
30 ]
31 },
32 kind: Binding 20 kind: Binding
33 }, 21 },
34 CompletionItem { 22 CompletionItem {
35 label: "quux", 23 label: "quux",
36 source_range: [214; 214), 24 source_range: [214; 214),
37 text_edit: TextEdit { 25 delete: [214; 214),
38 atoms: [ 26 insert: "quux()$0",
39 AtomTextEdit {
40 delete: [214; 214),
41 insert: "quux()$0"
42 }
43 ]
44 },
45 kind: Function, 27 kind: Function,
46 detail: "fn quux()" 28 detail: "fn quux()"
47 } 29 }
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__bindings_from_let.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__bindings_from_let.snap
index 1b4cbf91e..173f5319a 100644
--- a/crates/ra_ide_api/src/completion/snapshots/completion_item__bindings_from_let.snap
+++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__bindings_from_let.snap
@@ -1,5 +1,5 @@
1--- 1---
2created: "2019-02-18T09:10:52.090000719Z" 2created: "2019-02-18T09:22:24.126696322Z"
3creator: [email protected] 3creator: [email protected]
4source: crates/ra_ide_api/src/completion/completion_item.rs 4source: crates/ra_ide_api/src/completion/completion_item.rs
5expression: kind_completions 5expression: kind_completions
@@ -8,41 +8,23 @@ expression: kind_completions
8 CompletionItem { 8 CompletionItem {
9 label: "quux", 9 label: "quux",
10 source_range: [79; 79), 10 source_range: [79; 79),
11 text_edit: TextEdit { 11 delete: [79; 79),
12 atoms: [ 12 insert: "quux($0)",
13 AtomTextEdit {
14 delete: [79; 79),
15 insert: "quux($0)"
16 }
17 ]
18 },
19 kind: Function, 13 kind: Function,
20 detail: "fn quux(x: i32)" 14 detail: "fn quux(x: i32)"
21 }, 15 },
22 CompletionItem { 16 CompletionItem {
23 label: "x", 17 label: "x",
24 source_range: [79; 79), 18 source_range: [79; 79),
25 text_edit: TextEdit { 19 delete: [79; 79),
26 atoms: [ 20 insert: "x",
27 AtomTextEdit {
28 delete: [79; 79),
29 insert: "x"
30 }
31 ]
32 },
33 kind: Binding 21 kind: Binding
34 }, 22 },
35 CompletionItem { 23 CompletionItem {
36 label: "y", 24 label: "y",
37 source_range: [79; 79), 25 source_range: [79; 79),
38 text_edit: TextEdit { 26 delete: [79; 79),
39 atoms: [ 27 insert: "y",
40 AtomTextEdit {
41 delete: [79; 79),
42 insert: "y"
43 }
44 ]
45 },
46 kind: Binding 28 kind: Binding
47 } 29 }
48] 30]
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__completes_break_and_continue_in_loops1.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__completes_break_and_continue_in_loops1.snap
index 74f6fcd77..42ff02469 100644
--- a/crates/ra_ide_api/src/completion/snapshots/completion_item__completes_break_and_continue_in_loops1.snap
+++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__completes_break_and_continue_in_loops1.snap
@@ -1,5 +1,5 @@
1--- 1---
2created: "2019-02-18T09:10:51.974241301Z" 2created: "2019-02-18T09:22:23.976673150Z"
3creator: [email protected] 3creator: [email protected]
4source: crates/ra_ide_api/src/completion/completion_item.rs 4source: crates/ra_ide_api/src/completion/completion_item.rs
5expression: kind_completions 5expression: kind_completions
@@ -8,92 +8,50 @@ expression: kind_completions
8 CompletionItem { 8 CompletionItem {
9 label: "break", 9 label: "break",
10 source_range: [55; 55), 10 source_range: [55; 55),
11 text_edit: TextEdit { 11 delete: [55; 55),
12 atoms: [ 12 insert: "break;",
13 AtomTextEdit {
14 delete: [55; 55),
15 insert: "break;"
16 }
17 ]
18 },
19 kind: Keyword 13 kind: Keyword
20 }, 14 },
21 CompletionItem { 15 CompletionItem {
22 label: "continue", 16 label: "continue",
23 source_range: [55; 55), 17 source_range: [55; 55),
24 text_edit: TextEdit { 18 delete: [55; 55),
25 atoms: [ 19 insert: "continue;",
26 AtomTextEdit {
27 delete: [55; 55),
28 insert: "continue;"
29 }
30 ]
31 },
32 kind: Keyword 20 kind: Keyword
33 }, 21 },
34 CompletionItem { 22 CompletionItem {
35 label: "if", 23 label: "if",
36 source_range: [55; 55), 24 source_range: [55; 55),
37 text_edit: TextEdit { 25 delete: [55; 55),
38 atoms: [ 26 insert: "if $0 {}",
39 AtomTextEdit {
40 delete: [55; 55),
41 insert: "if $0 {}"
42 }
43 ]
44 },
45 kind: Keyword 27 kind: Keyword
46 }, 28 },
47 CompletionItem { 29 CompletionItem {
48 label: "loop", 30 label: "loop",
49 source_range: [55; 55), 31 source_range: [55; 55),
50 text_edit: TextEdit { 32 delete: [55; 55),
51 atoms: [ 33 insert: "loop {$0}",
52 AtomTextEdit {
53 delete: [55; 55),
54 insert: "loop {$0}"
55 }
56 ]
57 },
58 kind: Keyword 34 kind: Keyword
59 }, 35 },
60 CompletionItem { 36 CompletionItem {
61 label: "match", 37 label: "match",
62 source_range: [55; 55), 38 source_range: [55; 55),
63 text_edit: TextEdit { 39 delete: [55; 55),
64 atoms: [ 40 insert: "match $0 {}",
65 AtomTextEdit {
66 delete: [55; 55),
67 insert: "match $0 {}"
68 }
69 ]
70 },
71 kind: Keyword 41 kind: Keyword
72 }, 42 },
73 CompletionItem { 43 CompletionItem {
74 label: "return", 44 label: "return",
75 source_range: [55; 55), 45 source_range: [55; 55),
76 text_edit: TextEdit { 46 delete: [55; 55),
77 atoms: [ 47 insert: "return $0;",
78 AtomTextEdit {
79 delete: [55; 55),
80 insert: "return $0;"
81 }
82 ]
83 },
84 kind: Keyword 48 kind: Keyword
85 }, 49 },
86 CompletionItem { 50 CompletionItem {
87 label: "while", 51 label: "while",
88 source_range: [55; 55), 52 source_range: [55; 55),
89 text_edit: TextEdit { 53 delete: [55; 55),
90 atoms: [ 54 insert: "while $0 {}",
91 AtomTextEdit {
92 delete: [55; 55),
93 insert: "while $0 {}"
94 }
95 ]
96 },
97 kind: Keyword 55 kind: Keyword
98 } 56 }
99] 57]
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__completes_break_and_continue_in_loops2.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__completes_break_and_continue_in_loops2.snap
index 225ca4c7f..057ff8a7a 100644
--- a/crates/ra_ide_api/src/completion/snapshots/completion_item__completes_break_and_continue_in_loops2.snap
+++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__completes_break_and_continue_in_loops2.snap
@@ -1,5 +1,5 @@
1--- 1---
2created: "2019-02-18T09:10:52.011157905Z" 2created: "2019-02-18T09:22:24.068967569Z"
3creator: [email protected] 3creator: [email protected]
4source: crates/ra_ide_api/src/completion/completion_item.rs 4source: crates/ra_ide_api/src/completion/completion_item.rs
5expression: kind_completions 5expression: kind_completions
@@ -8,66 +8,36 @@ expression: kind_completions
8 CompletionItem { 8 CompletionItem {
9 label: "if", 9 label: "if",
10 source_range: [60; 60), 10 source_range: [60; 60),
11 text_edit: TextEdit { 11 delete: [60; 60),
12 atoms: [ 12 insert: "if $0 {}",
13 AtomTextEdit {
14 delete: [60; 60),
15 insert: "if $0 {}"
16 }
17 ]
18 },
19 kind: Keyword 13 kind: Keyword
20 }, 14 },
21 CompletionItem { 15 CompletionItem {
22 label: "loop", 16 label: "loop",
23 source_range: [60; 60), 17 source_range: [60; 60),
24 text_edit: TextEdit { 18 delete: [60; 60),
25 atoms: [ 19 insert: "loop {$0}",
26 AtomTextEdit {
27 delete: [60; 60),
28 insert: "loop {$0}"
29 }
30 ]
31 },
32 kind: Keyword 20 kind: Keyword
33 }, 21 },
34 CompletionItem { 22 CompletionItem {
35 label: "match", 23 label: "match",
36 source_range: [60; 60), 24 source_range: [60; 60),
37 text_edit: TextEdit { 25 delete: [60; 60),
38 atoms: [ 26 insert: "match $0 {}",
39 AtomTextEdit {
40 delete: [60; 60),
41 insert: "match $0 {}"
42 }
43 ]
44 },
45 kind: Keyword 27 kind: Keyword
46 }, 28 },
47 CompletionItem { 29 CompletionItem {
48 label: "return", 30 label: "return",
49 source_range: [60; 60), 31 source_range: [60; 60),
50 text_edit: TextEdit { 32 delete: [60; 60),
51 atoms: [ 33 insert: "return $0;",
52 AtomTextEdit {
53 delete: [60; 60),
54 insert: "return $0;"
55 }
56 ]
57 },
58 kind: Keyword 34 kind: Keyword
59 }, 35 },
60 CompletionItem { 36 CompletionItem {
61 label: "while", 37 label: "while",
62 source_range: [60; 60), 38 source_range: [60; 60),
63 text_edit: TextEdit { 39 delete: [60; 60),
64 atoms: [ 40 insert: "while $0 {}",
65 AtomTextEdit {
66 delete: [60; 60),
67 insert: "while $0 {}"
68 }
69 ]
70 },
71 kind: Keyword 41 kind: Keyword
72 } 42 }
73] 43]
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__completes_prelude.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__completes_prelude.snap
index 58515b86f..16126ee77 100644
--- a/crates/ra_ide_api/src/completion/snapshots/completion_item__completes_prelude.snap
+++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__completes_prelude.snap
@@ -1,5 +1,5 @@
1--- 1---
2created: "2019-02-18T09:10:52.125606390Z" 2created: "2019-02-18T09:22:24.180517434Z"
3creator: [email protected] 3creator: [email protected]
4source: crates/ra_ide_api/src/completion/completion_item.rs 4source: crates/ra_ide_api/src/completion/completion_item.rs
5expression: kind_completions 5expression: kind_completions
@@ -8,41 +8,23 @@ expression: kind_completions
8 CompletionItem { 8 CompletionItem {
9 label: "Option", 9 label: "Option",
10 source_range: [18; 18), 10 source_range: [18; 18),
11 text_edit: TextEdit { 11 delete: [18; 18),
12 atoms: [ 12 insert: "Option",
13 AtomTextEdit {
14 delete: [18; 18),
15 insert: "Option"
16 }
17 ]
18 },
19 kind: Struct 13 kind: Struct
20 }, 14 },
21 CompletionItem { 15 CompletionItem {
22 label: "foo", 16 label: "foo",
23 source_range: [18; 18), 17 source_range: [18; 18),
24 text_edit: TextEdit { 18 delete: [18; 18),
25 atoms: [ 19 insert: "foo()$0",
26 AtomTextEdit {
27 delete: [18; 18),
28 insert: "foo()$0"
29 }
30 ]
31 },
32 kind: Function, 20 kind: Function,
33 detail: "fn foo()" 21 detail: "fn foo()"
34 }, 22 },
35 CompletionItem { 23 CompletionItem {
36 label: "std", 24 label: "std",
37 source_range: [18; 18), 25 source_range: [18; 18),
38 text_edit: TextEdit { 26 delete: [18; 18),
39 atoms: [ 27 insert: "std",
40 AtomTextEdit {
41 delete: [18; 18),
42 insert: "std"
43 }
44 ]
45 },
46 kind: Module 28 kind: Module
47 } 29 }
48] 30]
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__completes_use_paths_across_crates.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__completes_use_paths_across_crates.snap
index 3b6ff57c1..2420e7744 100644
--- a/crates/ra_ide_api/src/completion/snapshots/completion_item__completes_use_paths_across_crates.snap
+++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__completes_use_paths_across_crates.snap
@@ -1,5 +1,5 @@
1--- 1---
2created: "2019-02-18T09:10:52.081693428Z" 2created: "2019-02-18T09:22:24.118807216Z"
3creator: [email protected] 3creator: [email protected]
4source: crates/ra_ide_api/src/completion/completion_item.rs 4source: crates/ra_ide_api/src/completion/completion_item.rs
5expression: kind_completions 5expression: kind_completions
@@ -8,14 +8,8 @@ expression: kind_completions
8 CompletionItem { 8 CompletionItem {
9 label: "bar", 9 label: "bar",
10 source_range: [9; 9), 10 source_range: [9; 9),
11 text_edit: TextEdit { 11 delete: [9; 9),
12 atoms: [ 12 insert: "bar",
13 AtomTextEdit {
14 delete: [9; 9),
15 insert: "bar"
16 }
17 ]
18 },
19 kind: Module 13 kind: Module
20 } 14 }
21] 15]
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__deeply_nested_use_tree.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__deeply_nested_use_tree.snap
index 1fb15ee0d..c472f7965 100644
--- a/crates/ra_ide_api/src/completion/snapshots/completion_item__deeply_nested_use_tree.snap
+++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__deeply_nested_use_tree.snap
@@ -1,5 +1,5 @@
1--- 1---
2created: "2019-02-18T09:10:52.018717911Z" 2created: "2019-02-18T09:22:24.044567777Z"
3creator: [email protected] 3creator: [email protected]
4source: crates/ra_ide_api/src/completion/completion_item.rs 4source: crates/ra_ide_api/src/completion/completion_item.rs
5expression: kind_completions 5expression: kind_completions
@@ -8,14 +8,8 @@ expression: kind_completions
8 CompletionItem { 8 CompletionItem {
9 label: "Spam", 9 label: "Spam",
10 source_range: [23; 25), 10 source_range: [23; 25),
11 text_edit: TextEdit { 11 delete: [23; 25),
12 atoms: [ 12 insert: "Spam",
13 AtomTextEdit {
14 delete: [23; 25),
15 insert: "Spam"
16 }
17 ]
18 },
19 kind: Struct 13 kind: Struct
20 } 14 }
21] 15]
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__dont_add_semi_after_return_if_not_a_statement.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__dont_add_semi_after_return_if_not_a_statement.snap
index 34e75ef80..97bd76c49 100644
--- a/crates/ra_ide_api/src/completion/snapshots/completion_item__dont_add_semi_after_return_if_not_a_statement.snap
+++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__dont_add_semi_after_return_if_not_a_statement.snap
@@ -1,5 +1,5 @@
1--- 1---
2created: "2019-02-18T09:10:51.979744970Z" 2created: "2019-02-18T09:22:23.987788705Z"
3creator: [email protected] 3creator: [email protected]
4source: crates/ra_ide_api/src/completion/completion_item.rs 4source: crates/ra_ide_api/src/completion/completion_item.rs
5expression: kind_completions 5expression: kind_completions
@@ -8,66 +8,36 @@ expression: kind_completions
8 CompletionItem { 8 CompletionItem {
9 label: "if", 9 label: "if",
10 source_range: [85; 85), 10 source_range: [85; 85),
11 text_edit: TextEdit { 11 delete: [85; 85),
12 atoms: [ 12 insert: "if $0 {}",
13 AtomTextEdit {
14 delete: [85; 85),
15 insert: "if $0 {}"
16 }
17 ]
18 },
19 kind: Keyword 13 kind: Keyword
20 }, 14 },
21 CompletionItem { 15 CompletionItem {
22 label: "loop", 16 label: "loop",
23 source_range: [85; 85), 17 source_range: [85; 85),
24 text_edit: TextEdit { 18 delete: [85; 85),
25 atoms: [ 19 insert: "loop {$0}",
26 AtomTextEdit {
27 delete: [85; 85),
28 insert: "loop {$0}"
29 }
30 ]
31 },
32 kind: Keyword 20 kind: Keyword
33 }, 21 },
34 CompletionItem { 22 CompletionItem {
35 label: "match", 23 label: "match",
36 source_range: [85; 85), 24 source_range: [85; 85),
37 text_edit: TextEdit { 25 delete: [85; 85),
38 atoms: [ 26 insert: "match $0 {}",
39 AtomTextEdit {
40 delete: [85; 85),
41 insert: "match $0 {}"
42 }
43 ]
44 },
45 kind: Keyword 27 kind: Keyword
46 }, 28 },
47 CompletionItem { 29 CompletionItem {
48 label: "return", 30 label: "return",
49 source_range: [85; 85), 31 source_range: [85; 85),
50 text_edit: TextEdit { 32 delete: [85; 85),
51 atoms: [ 33 insert: "return $0",
52 AtomTextEdit {
53 delete: [85; 85),
54 insert: "return $0"
55 }
56 ]
57 },
58 kind: Keyword 34 kind: Keyword
59 }, 35 },
60 CompletionItem { 36 CompletionItem {
61 label: "while", 37 label: "while",
62 source_range: [85; 85), 38 source_range: [85; 85),
63 text_edit: TextEdit { 39 delete: [85; 85),
64 atoms: [ 40 insert: "while $0 {}",
65 AtomTextEdit {
66 delete: [85; 85),
67 insert: "while $0 {}"
68 }
69 ]
70 },
71 kind: Keyword 41 kind: Keyword
72 } 42 }
73] 43]
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__dont_render_function_parens_if_already_call.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__dont_render_function_parens_if_already_call.snap
index 89ae3d405..1de0efb5b 100644
--- a/crates/ra_ide_api/src/completion/snapshots/completion_item__dont_render_function_parens_if_already_call.snap
+++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__dont_render_function_parens_if_already_call.snap
@@ -1,5 +1,5 @@
1--- 1---
2created: "2019-02-18T09:10:52.163807552Z" 2created: "2019-02-18T09:22:24.211680376Z"
3creator: [email protected] 3creator: [email protected]
4source: crates/ra_ide_api/src/completion/completion_item.rs 4source: crates/ra_ide_api/src/completion/completion_item.rs
5expression: kind_completions 5expression: kind_completions
@@ -8,28 +8,16 @@ expression: kind_completions
8 CompletionItem { 8 CompletionItem {
9 label: "frobnicate", 9 label: "frobnicate",
10 source_range: [35; 39), 10 source_range: [35; 39),
11 text_edit: TextEdit { 11 delete: [35; 39),
12 atoms: [ 12 insert: "frobnicate",
13 AtomTextEdit {
14 delete: [35; 39),
15 insert: "frobnicate"
16 }
17 ]
18 },
19 kind: Function, 13 kind: Function,
20 detail: "fn frobnicate()" 14 detail: "fn frobnicate()"
21 }, 15 },
22 CompletionItem { 16 CompletionItem {
23 label: "main", 17 label: "main",
24 source_range: [35; 39), 18 source_range: [35; 39),
25 text_edit: TextEdit { 19 delete: [35; 39),
26 atoms: [ 20 insert: "main",
27 AtomTextEdit {
28 delete: [35; 39),
29 insert: "main"
30 }
31 ]
32 },
33 kind: Function, 21 kind: Function,
34 detail: "fn main()" 22 detail: "fn main()"
35 } 23 }
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__dont_render_function_parens_if_already_call_assoc_fn.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__dont_render_function_parens_if_already_call_assoc_fn.snap
index ab4075c50..39fff2cb7 100644
--- a/crates/ra_ide_api/src/completion/snapshots/completion_item__dont_render_function_parens_if_already_call_assoc_fn.snap
+++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__dont_render_function_parens_if_already_call_assoc_fn.snap
@@ -1,5 +1,5 @@
1--- 1---
2created: "2019-02-18T09:10:52.194798097Z" 2created: "2019-02-18T09:22:24.268227065Z"
3creator: [email protected] 3creator: [email protected]
4source: crates/ra_ide_api/src/completion/completion_item.rs 4source: crates/ra_ide_api/src/completion/completion_item.rs
5expression: kind_completions 5expression: kind_completions
@@ -8,14 +8,8 @@ expression: kind_completions
8 CompletionItem { 8 CompletionItem {
9 label: "new", 9 label: "new",
10 source_range: [67; 69), 10 source_range: [67; 69),
11 text_edit: TextEdit { 11 delete: [67; 69),
12 atoms: [ 12 insert: "new",
13 AtomTextEdit {
14 delete: [67; 69),
15 insert: "new"
16 }
17 ]
18 },
19 kind: Method, 13 kind: Method,
20 detail: "fn new() -> Foo" 14 detail: "fn new() -> Foo"
21 } 15 }
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__dont_render_function_parens_in_use_item.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__dont_render_function_parens_in_use_item.snap
index 259f9fc62..ef77816ec 100644
--- a/crates/ra_ide_api/src/completion/snapshots/completion_item__dont_render_function_parens_in_use_item.snap
+++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__dont_render_function_parens_in_use_item.snap
@@ -1,5 +1,5 @@
1--- 1---
2created: "2019-02-18T09:10:52.156083575Z" 2created: "2019-02-18T09:22:24.213677341Z"
3creator: [email protected] 3creator: [email protected]
4source: crates/ra_ide_api/src/completion/completion_item.rs 4source: crates/ra_ide_api/src/completion/completion_item.rs
5expression: kind_completions 5expression: kind_completions
@@ -8,14 +8,8 @@ expression: kind_completions
8 CompletionItem { 8 CompletionItem {
9 label: "foo", 9 label: "foo",
10 source_range: [40; 41), 10 source_range: [40; 41),
11 text_edit: TextEdit { 11 delete: [40; 41),
12 atoms: [ 12 insert: "foo",
13 AtomTextEdit {
14 delete: [40; 41),
15 insert: "foo"
16 }
17 ]
18 },
19 kind: Function, 13 kind: Function,
20 detail: "pub fn foo()" 14 detail: "pub fn foo()"
21 } 15 }
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__dont_show_both_completions_for_shadowing.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__dont_show_both_completions_for_shadowing.snap
index 7af2f3eb9..87691b304 100644
--- a/crates/ra_ide_api/src/completion/snapshots/completion_item__dont_show_both_completions_for_shadowing.snap
+++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__dont_show_both_completions_for_shadowing.snap
@@ -1,5 +1,5 @@
1--- 1---
2created: "2019-02-18T09:10:52.134207539Z" 2created: "2019-02-18T09:22:24.188564584Z"
3creator: [email protected] 3creator: [email protected]
4source: crates/ra_ide_api/src/completion/completion_item.rs 4source: crates/ra_ide_api/src/completion/completion_item.rs
5expression: kind_completions 5expression: kind_completions
@@ -8,27 +8,15 @@ expression: kind_completions
8 CompletionItem { 8 CompletionItem {
9 label: "bar", 9 label: "bar",
10 source_range: [129; 129), 10 source_range: [129; 129),
11 text_edit: TextEdit { 11 delete: [129; 129),
12 atoms: [ 12 insert: "bar",
13 AtomTextEdit {
14 delete: [129; 129),
15 insert: "bar"
16 }
17 ]
18 },
19 kind: Binding 13 kind: Binding
20 }, 14 },
21 CompletionItem { 15 CompletionItem {
22 label: "foo", 16 label: "foo",
23 source_range: [129; 129), 17 source_range: [129; 129),
24 text_edit: TextEdit { 18 delete: [129; 129),
25 atoms: [ 19 insert: "foo()$0",
26 AtomTextEdit {
27 delete: [129; 129),
28 insert: "foo()$0"
29 }
30 ]
31 },
32 kind: Function, 20 kind: Function,
33 detail: "fn foo() ->" 21 detail: "fn foo() ->"
34 } 22 }
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__enum_variant.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__enum_variant.snap
index 7f36a5ec5..1df121523 100644
--- a/crates/ra_ide_api/src/completion/snapshots/completion_item__enum_variant.snap
+++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__enum_variant.snap
@@ -1,5 +1,5 @@
1--- 1---
2created: "2019-02-18T09:10:52.033853029Z" 2created: "2019-02-18T09:22:24.045355450Z"
3creator: [email protected] 3creator: [email protected]
4source: crates/ra_ide_api/src/completion/completion_item.rs 4source: crates/ra_ide_api/src/completion/completion_item.rs
5expression: kind_completions 5expression: kind_completions
@@ -8,14 +8,8 @@ expression: kind_completions
8 CompletionItem { 8 CompletionItem {
9 label: "Bar", 9 label: "Bar",
10 source_range: [116; 116), 10 source_range: [116; 116),
11 text_edit: TextEdit { 11 delete: [116; 116),
12 atoms: [ 12 insert: "Bar",
13 AtomTextEdit {
14 delete: [116; 116),
15 insert: "Bar"
16 }
17 ]
18 },
19 kind: EnumVariant, 13 kind: EnumVariant,
20 detail: "(i32)", 14 detail: "(i32)",
21 documentation: Documentation( 15 documentation: Documentation(
@@ -25,14 +19,8 @@ expression: kind_completions
25 CompletionItem { 19 CompletionItem {
26 label: "Foo", 20 label: "Foo",
27 source_range: [116; 116), 21 source_range: [116; 116),
28 text_edit: TextEdit { 22 delete: [116; 116),
29 atoms: [ 23 insert: "Foo",
30 AtomTextEdit {
31 delete: [116; 116),
32 insert: "Foo"
33 }
34 ]
35 },
36 kind: EnumVariant, 24 kind: EnumVariant,
37 detail: "()", 25 detail: "()",
38 documentation: Documentation( 26 documentation: Documentation(
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__enum_variant_with_details.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__enum_variant_with_details.snap
index 0d2390eb2..70ea96e1b 100644
--- a/crates/ra_ide_api/src/completion/snapshots/completion_item__enum_variant_with_details.snap
+++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__enum_variant_with_details.snap
@@ -1,5 +1,5 @@
1--- 1---
2created: "2019-02-18T09:10:52.039179076Z" 2created: "2019-02-18T09:22:24.062138085Z"
3creator: [email protected] 3creator: [email protected]
4source: crates/ra_ide_api/src/completion/completion_item.rs 4source: crates/ra_ide_api/src/completion/completion_item.rs
5expression: kind_completions 5expression: kind_completions
@@ -8,14 +8,8 @@ expression: kind_completions
8 CompletionItem { 8 CompletionItem {
9 label: "Bar", 9 label: "Bar",
10 source_range: [180; 180), 10 source_range: [180; 180),
11 text_edit: TextEdit { 11 delete: [180; 180),
12 atoms: [ 12 insert: "Bar",
13 AtomTextEdit {
14 delete: [180; 180),
15 insert: "Bar"
16 }
17 ]
18 },
19 kind: EnumVariant, 13 kind: EnumVariant,
20 detail: "(i32, u32)", 14 detail: "(i32, u32)",
21 documentation: Documentation( 15 documentation: Documentation(
@@ -25,14 +19,8 @@ expression: kind_completions
25 CompletionItem { 19 CompletionItem {
26 label: "Foo", 20 label: "Foo",
27 source_range: [180; 180), 21 source_range: [180; 180),
28 text_edit: TextEdit { 22 delete: [180; 180),
29 atoms: [ 23 insert: "Foo",
30 AtomTextEdit {
31 delete: [180; 180),
32 insert: "Foo"
33 }
34 ]
35 },
36 kind: EnumVariant, 24 kind: EnumVariant,
37 detail: "()", 25 detail: "()",
38 documentation: Documentation( 26 documentation: Documentation(
@@ -42,14 +30,8 @@ expression: kind_completions
42 CompletionItem { 30 CompletionItem {
43 label: "S", 31 label: "S",
44 source_range: [180; 180), 32 source_range: [180; 180),
45 text_edit: TextEdit { 33 delete: [180; 180),
46 atoms: [ 34 insert: "S",
47 AtomTextEdit {
48 delete: [180; 180),
49 insert: "S"
50 }
51 ]
52 },
53 kind: EnumVariant, 35 kind: EnumVariant,
54 detail: "(S)" 36 detail: "(S)"
55 } 37 }
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__extern_prelude.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__extern_prelude.snap
index 249b51311..0d36fd603 100644
--- a/crates/ra_ide_api/src/completion/snapshots/completion_item__extern_prelude.snap
+++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__extern_prelude.snap
@@ -1,5 +1,5 @@
1--- 1---
2created: "2019-02-18T09:10:52.097703010Z" 2created: "2019-02-18T09:22:24.137183638Z"
3creator: [email protected] 3creator: [email protected]
4source: crates/ra_ide_api/src/completion/completion_item.rs 4source: crates/ra_ide_api/src/completion/completion_item.rs
5expression: kind_completions 5expression: kind_completions
@@ -8,14 +8,8 @@ expression: kind_completions
8 CompletionItem { 8 CompletionItem {
9 label: "other_crate", 9 label: "other_crate",
10 source_range: [4; 4), 10 source_range: [4; 4),
11 text_edit: TextEdit { 11 delete: [4; 4),
12 atoms: [ 12 insert: "other_crate",
13 AtomTextEdit {
14 delete: [4; 4),
15 insert: "other_crate"
16 }
17 ]
18 },
19 kind: Module 13 kind: Module
20 } 14 }
21] 15]
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__generic_params.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__generic_params.snap
index d73860e72..210e5a02d 100644
--- a/crates/ra_ide_api/src/completion/snapshots/completion_item__generic_params.snap
+++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__generic_params.snap
@@ -1,5 +1,5 @@
1--- 1---
2created: "2019-02-18T09:10:52.113095718Z" 2created: "2019-02-18T09:22:24.143253235Z"
3creator: [email protected] 3creator: [email protected]
4source: crates/ra_ide_api/src/completion/completion_item.rs 4source: crates/ra_ide_api/src/completion/completion_item.rs
5expression: kind_completions 5expression: kind_completions
@@ -8,27 +8,15 @@ expression: kind_completions
8 CompletionItem { 8 CompletionItem {
9 label: "T", 9 label: "T",
10 source_range: [44; 44), 10 source_range: [44; 44),
11 text_edit: TextEdit { 11 delete: [44; 44),
12 atoms: [ 12 insert: "T",
13 AtomTextEdit {
14 delete: [44; 44),
15 insert: "T"
16 }
17 ]
18 },
19 kind: TypeParam 13 kind: TypeParam
20 }, 14 },
21 CompletionItem { 15 CompletionItem {
22 label: "quux", 16 label: "quux",
23 source_range: [44; 44), 17 source_range: [44; 44),
24 text_edit: TextEdit { 18 delete: [44; 44),
25 atoms: [ 19 insert: "quux()$0",
26 AtomTextEdit {
27 delete: [44; 44),
28 insert: "quux()$0"
29 }
30 ]
31 },
32 kind: Function, 20 kind: Function,
33 detail: "fn quux<T>()" 21 detail: "fn quux<T>()"
34 } 22 }
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__generic_params_in_struct.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__generic_params_in_struct.snap
index b75350f0e..ab8c30446 100644
--- a/crates/ra_ide_api/src/completion/snapshots/completion_item__generic_params_in_struct.snap
+++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__generic_params_in_struct.snap
@@ -1,5 +1,5 @@
1--- 1---
2created: "2019-02-18T09:10:52.117910091Z" 2created: "2019-02-18T09:22:24.149424158Z"
3creator: [email protected] 3creator: [email protected]
4source: crates/ra_ide_api/src/completion/completion_item.rs 4source: crates/ra_ide_api/src/completion/completion_item.rs
5expression: kind_completions 5expression: kind_completions
@@ -8,27 +8,15 @@ expression: kind_completions
8 CompletionItem { 8 CompletionItem {
9 label: "T", 9 label: "T",
10 source_range: [46; 46), 10 source_range: [46; 46),
11 text_edit: TextEdit { 11 delete: [46; 46),
12 atoms: [ 12 insert: "T",
13 AtomTextEdit {
14 delete: [46; 46),
15 insert: "T"
16 }
17 ]
18 },
19 kind: TypeParam 13 kind: TypeParam
20 }, 14 },
21 CompletionItem { 15 CompletionItem {
22 label: "X", 16 label: "X",
23 source_range: [46; 46), 17 source_range: [46; 46),
24 text_edit: TextEdit { 18 delete: [46; 46),
25 atoms: [ 19 insert: "X",
26 AtomTextEdit {
27 delete: [46; 46),
28 insert: "X"
29 }
30 ]
31 },
32 kind: Struct 20 kind: Struct
33 } 21 }
34] 22]
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__inserts_parens_for_function_calls1.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__inserts_parens_for_function_calls1.snap
index 9a42b6c12..a4fc447b2 100644
--- a/crates/ra_ide_api/src/completion/snapshots/completion_item__inserts_parens_for_function_calls1.snap
+++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__inserts_parens_for_function_calls1.snap
@@ -1,5 +1,5 @@
1--- 1---
2created: "2019-02-18T09:10:52.160884429Z" 2created: "2019-02-18T09:22:24.224510370Z"
3creator: [email protected] 3creator: [email protected]
4source: crates/ra_ide_api/src/completion/completion_item.rs 4source: crates/ra_ide_api/src/completion/completion_item.rs
5expression: kind_completions 5expression: kind_completions
@@ -8,28 +8,16 @@ expression: kind_completions
8 CompletionItem { 8 CompletionItem {
9 label: "main", 9 label: "main",
10 source_range: [53; 56), 10 source_range: [53; 56),
11 text_edit: TextEdit { 11 delete: [53; 56),
12 atoms: [ 12 insert: "main()$0",
13 AtomTextEdit {
14 delete: [53; 56),
15 insert: "main()$0"
16 }
17 ]
18 },
19 kind: Function, 13 kind: Function,
20 detail: "fn main()" 14 detail: "fn main()"
21 }, 15 },
22 CompletionItem { 16 CompletionItem {
23 label: "no_args", 17 label: "no_args",
24 source_range: [53; 56), 18 source_range: [53; 56),
25 text_edit: TextEdit { 19 delete: [53; 56),
26 atoms: [ 20 insert: "no_args()$0",
27 AtomTextEdit {
28 delete: [53; 56),
29 insert: "no_args()$0"
30 }
31 ]
32 },
33 kind: Function, 21 kind: Function,
34 detail: "fn no_args()" 22 detail: "fn no_args()"
35 } 23 }
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__inserts_parens_for_function_calls2.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__inserts_parens_for_function_calls2.snap
index 5397a0bbe..b124355d5 100644
--- a/crates/ra_ide_api/src/completion/snapshots/completion_item__inserts_parens_for_function_calls2.snap
+++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__inserts_parens_for_function_calls2.snap
@@ -1,5 +1,5 @@
1--- 1---
2created: "2019-02-18T09:10:52.192876554Z" 2created: "2019-02-18T09:22:24.267013140Z"
3creator: [email protected] 3creator: [email protected]
4source: crates/ra_ide_api/src/completion/completion_item.rs 4source: crates/ra_ide_api/src/completion/completion_item.rs
5expression: kind_completions 5expression: kind_completions
@@ -8,28 +8,16 @@ expression: kind_completions
8 CompletionItem { 8 CompletionItem {
9 label: "main", 9 label: "main",
10 source_range: [72; 77), 10 source_range: [72; 77),
11 text_edit: TextEdit { 11 delete: [72; 77),
12 atoms: [ 12 insert: "main()$0",
13 AtomTextEdit {
14 delete: [72; 77),
15 insert: "main()$0"
16 }
17 ]
18 },
19 kind: Function, 13 kind: Function,
20 detail: "fn main()" 14 detail: "fn main()"
21 }, 15 },
22 CompletionItem { 16 CompletionItem {
23 label: "with_args", 17 label: "with_args",
24 source_range: [72; 77), 18 source_range: [72; 77),
25 text_edit: TextEdit { 19 delete: [72; 77),
26 atoms: [ 20 insert: "with_args($0)",
27 AtomTextEdit {
28 delete: [72; 77),
29 insert: "with_args($0)"
30 }
31 ]
32 },
33 kind: Function, 21 kind: Function,
34 detail: "fn with_args(x: i32, y: String)" 22 detail: "fn with_args(x: i32, y: String)"
35 } 23 }
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__inserts_parens_for_function_calls3.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__inserts_parens_for_function_calls3.snap
index 97c128dcb..fec729d48 100644
--- a/crates/ra_ide_api/src/completion/snapshots/completion_item__inserts_parens_for_function_calls3.snap
+++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__inserts_parens_for_function_calls3.snap
@@ -1,5 +1,5 @@
1--- 1---
2created: "2019-02-18T09:10:52.224275781Z" 2created: "2019-02-18T09:22:24.303360770Z"
3creator: [email protected] 3creator: [email protected]
4source: crates/ra_ide_api/src/completion/completion_item.rs 4source: crates/ra_ide_api/src/completion/completion_item.rs
5expression: kind_completions 5expression: kind_completions
@@ -8,14 +8,8 @@ expression: kind_completions
8 CompletionItem { 8 CompletionItem {
9 label: "foo", 9 label: "foo",
10 source_range: [139; 140), 10 source_range: [139; 140),
11 text_edit: TextEdit { 11 delete: [139; 140),
12 atoms: [ 12 insert: "foo()$0",
13 AtomTextEdit {
14 delete: [139; 140),
15 insert: "foo()$0"
16 }
17 ]
18 },
19 kind: Method, 13 kind: Method,
20 detail: "fn foo(&self)" 14 detail: "fn foo(&self)"
21 } 15 }
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__keywords_in_function1.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__keywords_in_function1.snap
index 18f1aa846..045e2a4e6 100644
--- a/crates/ra_ide_api/src/completion/snapshots/completion_item__keywords_in_function1.snap
+++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__keywords_in_function1.snap
@@ -1,5 +1,5 @@
1--- 1---
2created: "2019-02-18T09:10:51.982940400Z" 2created: "2019-02-18T09:22:23.987788720Z"
3creator: [email protected] 3creator: [email protected]
4source: crates/ra_ide_api/src/completion/completion_item.rs 4source: crates/ra_ide_api/src/completion/completion_item.rs
5expression: kind_completions 5expression: kind_completions
@@ -8,66 +8,36 @@ expression: kind_completions
8 CompletionItem { 8 CompletionItem {
9 label: "if", 9 label: "if",
10 source_range: [41; 41), 10 source_range: [41; 41),
11 text_edit: TextEdit { 11 delete: [41; 41),
12 atoms: [ 12 insert: "if $0 {}",
13 AtomTextEdit {
14 delete: [41; 41),
15 insert: "if $0 {}"
16 }
17 ]
18 },
19 kind: Keyword 13 kind: Keyword
20 }, 14 },
21 CompletionItem { 15 CompletionItem {
22 label: "loop", 16 label: "loop",
23 source_range: [41; 41), 17 source_range: [41; 41),
24 text_edit: TextEdit { 18 delete: [41; 41),
25 atoms: [ 19 insert: "loop {$0}",
26 AtomTextEdit {
27 delete: [41; 41),
28 insert: "loop {$0}"
29 }
30 ]
31 },
32 kind: Keyword 20 kind: Keyword
33 }, 21 },
34 CompletionItem { 22 CompletionItem {
35 label: "match", 23 label: "match",
36 source_range: [41; 41), 24 source_range: [41; 41),
37 text_edit: TextEdit { 25 delete: [41; 41),
38 atoms: [ 26 insert: "match $0 {}",
39 AtomTextEdit {
40 delete: [41; 41),
41 insert: "match $0 {}"
42 }
43 ]
44 },
45 kind: Keyword 27 kind: Keyword
46 }, 28 },
47 CompletionItem { 29 CompletionItem {
48 label: "return", 30 label: "return",
49 source_range: [41; 41), 31 source_range: [41; 41),
50 text_edit: TextEdit { 32 delete: [41; 41),
51 atoms: [ 33 insert: "return;",
52 AtomTextEdit {
53 delete: [41; 41),
54 insert: "return;"
55 }
56 ]
57 },
58 kind: Keyword 34 kind: Keyword
59 }, 35 },
60 CompletionItem { 36 CompletionItem {
61 label: "while", 37 label: "while",
62 source_range: [41; 41), 38 source_range: [41; 41),
63 text_edit: TextEdit { 39 delete: [41; 41),
64 atoms: [ 40 insert: "while $0 {}",
65 AtomTextEdit {
66 delete: [41; 41),
67 insert: "while $0 {}"
68 }
69 ]
70 },
71 kind: Keyword 41 kind: Keyword
72 } 42 }
73] 43]
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__keywords_in_function2.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__keywords_in_function2.snap
index 07e673852..b08efa522 100644
--- a/crates/ra_ide_api/src/completion/snapshots/completion_item__keywords_in_function2.snap
+++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__keywords_in_function2.snap
@@ -1,5 +1,5 @@
1--- 1---
2created: "2019-02-18T09:10:51.986894362Z" 2created: "2019-02-18T09:22:23.984740354Z"
3creator: [email protected] 3creator: [email protected]
4source: crates/ra_ide_api/src/completion/completion_item.rs 4source: crates/ra_ide_api/src/completion/completion_item.rs
5expression: kind_completions 5expression: kind_completions
@@ -8,92 +8,50 @@ expression: kind_completions
8 CompletionItem { 8 CompletionItem {
9 label: "else", 9 label: "else",
10 source_range: [92; 92), 10 source_range: [92; 92),
11 text_edit: TextEdit { 11 delete: [92; 92),
12 atoms: [ 12 insert: "else {$0}",
13 AtomTextEdit {
14 delete: [92; 92),
15 insert: "else {$0}"
16 }
17 ]
18 },
19 kind: Keyword 13 kind: Keyword
20 }, 14 },
21 CompletionItem { 15 CompletionItem {
22 label: "else if", 16 label: "else if",
23 source_range: [92; 92), 17 source_range: [92; 92),
24 text_edit: TextEdit { 18 delete: [92; 92),
25 atoms: [ 19 insert: "else if $0 {}",
26 AtomTextEdit {
27 delete: [92; 92),
28 insert: "else if $0 {}"
29 }
30 ]
31 },
32 kind: Keyword 20 kind: Keyword
33 }, 21 },
34 CompletionItem { 22 CompletionItem {
35 label: "if", 23 label: "if",
36 source_range: [92; 92), 24 source_range: [92; 92),
37 text_edit: TextEdit { 25 delete: [92; 92),
38 atoms: [ 26 insert: "if $0 {}",
39 AtomTextEdit {
40 delete: [92; 92),
41 insert: "if $0 {}"
42 }
43 ]
44 },
45 kind: Keyword 27 kind: Keyword
46 }, 28 },
47 CompletionItem { 29 CompletionItem {
48 label: "loop", 30 label: "loop",
49 source_range: [92; 92), 31 source_range: [92; 92),
50 text_edit: TextEdit { 32 delete: [92; 92),
51 atoms: [ 33 insert: "loop {$0}",
52 AtomTextEdit {
53 delete: [92; 92),
54 insert: "loop {$0}"
55 }
56 ]
57 },
58 kind: Keyword 34 kind: Keyword
59 }, 35 },
60 CompletionItem { 36 CompletionItem {
61 label: "match", 37 label: "match",
62 source_range: [92; 92), 38 source_range: [92; 92),
63 text_edit: TextEdit { 39 delete: [92; 92),
64 atoms: [ 40 insert: "match $0 {}",
65 AtomTextEdit {
66 delete: [92; 92),
67 insert: "match $0 {}"
68 }
69 ]
70 },
71 kind: Keyword 41 kind: Keyword
72 }, 42 },
73 CompletionItem { 43 CompletionItem {
74 label: "return", 44 label: "return",
75 source_range: [92; 92), 45 source_range: [92; 92),
76 text_edit: TextEdit { 46 delete: [92; 92),
77 atoms: [ 47 insert: "return;",
78 AtomTextEdit {
79 delete: [92; 92),
80 insert: "return;"
81 }
82 ]
83 },
84 kind: Keyword 48 kind: Keyword
85 }, 49 },
86 CompletionItem { 50 CompletionItem {
87 label: "while", 51 label: "while",
88 source_range: [92; 92), 52 source_range: [92; 92),
89 text_edit: TextEdit { 53 delete: [92; 92),
90 atoms: [ 54 insert: "while $0 {}",
91 AtomTextEdit {
92 delete: [92; 92),
93 insert: "while $0 {}"
94 }
95 ]
96 },
97 kind: Keyword 55 kind: Keyword
98 } 56 }
99] 57]
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__keywords_in_function3.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__keywords_in_function3.snap
index a31881175..e2b9214fb 100644
--- a/crates/ra_ide_api/src/completion/snapshots/completion_item__keywords_in_function3.snap
+++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__keywords_in_function3.snap
@@ -1,5 +1,5 @@
1--- 1---
2created: "2019-02-18T09:10:52.010821546Z" 2created: "2019-02-18T09:22:24.049699338Z"
3creator: [email protected] 3creator: [email protected]
4source: crates/ra_ide_api/src/completion/completion_item.rs 4source: crates/ra_ide_api/src/completion/completion_item.rs
5expression: kind_completions 5expression: kind_completions
@@ -8,66 +8,36 @@ expression: kind_completions
8 CompletionItem { 8 CompletionItem {
9 label: "if", 9 label: "if",
10 source_range: [48; 48), 10 source_range: [48; 48),
11 text_edit: TextEdit { 11 delete: [48; 48),
12 atoms: [ 12 insert: "if $0 {}",
13 AtomTextEdit {
14 delete: [48; 48),
15 insert: "if $0 {}"
16 }
17 ]
18 },
19 kind: Keyword 13 kind: Keyword
20 }, 14 },
21 CompletionItem { 15 CompletionItem {
22 label: "loop", 16 label: "loop",
23 source_range: [48; 48), 17 source_range: [48; 48),
24 text_edit: TextEdit { 18 delete: [48; 48),
25 atoms: [ 19 insert: "loop {$0}",
26 AtomTextEdit {
27 delete: [48; 48),
28 insert: "loop {$0}"
29 }
30 ]
31 },
32 kind: Keyword 20 kind: Keyword
33 }, 21 },
34 CompletionItem { 22 CompletionItem {
35 label: "match", 23 label: "match",
36 source_range: [48; 48), 24 source_range: [48; 48),
37 text_edit: TextEdit { 25 delete: [48; 48),
38 atoms: [ 26 insert: "match $0 {}",
39 AtomTextEdit {
40 delete: [48; 48),
41 insert: "match $0 {}"
42 }
43 ]
44 },
45 kind: Keyword 27 kind: Keyword
46 }, 28 },
47 CompletionItem { 29 CompletionItem {
48 label: "return", 30 label: "return",
49 source_range: [48; 48), 31 source_range: [48; 48),
50 text_edit: TextEdit { 32 delete: [48; 48),
51 atoms: [ 33 insert: "return $0;",
52 AtomTextEdit {
53 delete: [48; 48),
54 insert: "return $0;"
55 }
56 ]
57 },
58 kind: Keyword 34 kind: Keyword
59 }, 35 },
60 CompletionItem { 36 CompletionItem {
61 label: "while", 37 label: "while",
62 source_range: [48; 48), 38 source_range: [48; 48),
63 text_edit: TextEdit { 39 delete: [48; 48),
64 atoms: [ 40 insert: "while $0 {}",
65 AtomTextEdit {
66 delete: [48; 48),
67 insert: "while $0 {}"
68 }
69 ]
70 },
71 kind: Keyword 41 kind: Keyword
72 } 42 }
73] 43]
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__keywords_in_function4.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__keywords_in_function4.snap
index 8e66260f6..1ea7eb5ce 100644
--- a/crates/ra_ide_api/src/completion/snapshots/completion_item__keywords_in_function4.snap
+++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__keywords_in_function4.snap
@@ -1,5 +1,5 @@
1--- 1---
2created: "2019-02-18T09:10:52.039207401Z" 2created: "2019-02-18T09:22:24.090949782Z"
3creator: [email protected] 3creator: [email protected]
4source: crates/ra_ide_api/src/completion/completion_item.rs 4source: crates/ra_ide_api/src/completion/completion_item.rs
5expression: kind_completions 5expression: kind_completions
@@ -8,66 +8,36 @@ expression: kind_completions
8 CompletionItem { 8 CompletionItem {
9 label: "if", 9 label: "if",
10 source_range: [41; 41), 10 source_range: [41; 41),
11 text_edit: TextEdit { 11 delete: [41; 41),
12 atoms: [ 12 insert: "if $0 {}",
13 AtomTextEdit {
14 delete: [41; 41),
15 insert: "if $0 {}"
16 }
17 ]
18 },
19 kind: Keyword 13 kind: Keyword
20 }, 14 },
21 CompletionItem { 15 CompletionItem {
22 label: "loop", 16 label: "loop",
23 source_range: [41; 41), 17 source_range: [41; 41),
24 text_edit: TextEdit { 18 delete: [41; 41),
25 atoms: [ 19 insert: "loop {$0}",
26 AtomTextEdit {
27 delete: [41; 41),
28 insert: "loop {$0}"
29 }
30 ]
31 },
32 kind: Keyword 20 kind: Keyword
33 }, 21 },
34 CompletionItem { 22 CompletionItem {
35 label: "match", 23 label: "match",
36 source_range: [41; 41), 24 source_range: [41; 41),
37 text_edit: TextEdit { 25 delete: [41; 41),
38 atoms: [ 26 insert: "match $0 {}",
39 AtomTextEdit {
40 delete: [41; 41),
41 insert: "match $0 {}"
42 }
43 ]
44 },
45 kind: Keyword 27 kind: Keyword
46 }, 28 },
47 CompletionItem { 29 CompletionItem {
48 label: "return", 30 label: "return",
49 source_range: [41; 41), 31 source_range: [41; 41),
50 text_edit: TextEdit { 32 delete: [41; 41),
51 atoms: [ 33 insert: "return;",
52 AtomTextEdit {
53 delete: [41; 41),
54 insert: "return;"
55 }
56 ]
57 },
58 kind: Keyword 34 kind: Keyword
59 }, 35 },
60 CompletionItem { 36 CompletionItem {
61 label: "while", 37 label: "while",
62 source_range: [41; 41), 38 source_range: [41; 41),
63 text_edit: TextEdit { 39 delete: [41; 41),
64 atoms: [ 40 insert: "while $0 {}",
65 AtomTextEdit {
66 delete: [41; 41),
67 insert: "while $0 {}"
68 }
69 ]
70 },
71 kind: Keyword 41 kind: Keyword
72 } 42 }
73] 43]
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__keywords_in_use_stmt1.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__keywords_in_use_stmt1.snap
index facd37bd9..76d5daf55 100644
--- a/crates/ra_ide_api/src/completion/snapshots/completion_item__keywords_in_use_stmt1.snap
+++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__keywords_in_use_stmt1.snap
@@ -1,5 +1,5 @@
1--- 1---
2created: "2019-02-18T09:10:51.979744931Z" 2created: "2019-02-18T09:22:23.988755424Z"
3creator: [email protected] 3creator: [email protected]
4source: crates/ra_ide_api/src/completion/completion_item.rs 4source: crates/ra_ide_api/src/completion/completion_item.rs
5expression: kind_completions 5expression: kind_completions
@@ -8,40 +8,22 @@ expression: kind_completions
8 CompletionItem { 8 CompletionItem {
9 label: "crate", 9 label: "crate",
10 source_range: [17; 17), 10 source_range: [17; 17),
11 text_edit: TextEdit { 11 delete: [17; 17),
12 atoms: [ 12 insert: "crate::",
13 AtomTextEdit {
14 delete: [17; 17),
15 insert: "crate::"
16 }
17 ]
18 },
19 kind: Keyword 13 kind: Keyword
20 }, 14 },
21 CompletionItem { 15 CompletionItem {
22 label: "self", 16 label: "self",
23 source_range: [17; 17), 17 source_range: [17; 17),
24 text_edit: TextEdit { 18 delete: [17; 17),
25 atoms: [ 19 insert: "self",
26 AtomTextEdit {
27 delete: [17; 17),
28 insert: "self"
29 }
30 ]
31 },
32 kind: Keyword 20 kind: Keyword
33 }, 21 },
34 CompletionItem { 22 CompletionItem {
35 label: "super", 23 label: "super",
36 source_range: [17; 17), 24 source_range: [17; 17),
37 text_edit: TextEdit { 25 delete: [17; 17),
38 atoms: [ 26 insert: "super::",
39 AtomTextEdit {
40 delete: [17; 17),
41 insert: "super::"
42 }
43 ]
44 },
45 kind: Keyword 27 kind: Keyword
46 } 28 }
47] 29]
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__keywords_in_use_stmt2.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__keywords_in_use_stmt2.snap
index 7a9792b0e..ee8bf4ca1 100644
--- a/crates/ra_ide_api/src/completion/snapshots/completion_item__keywords_in_use_stmt2.snap
+++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__keywords_in_use_stmt2.snap
@@ -1,5 +1,5 @@
1--- 1---
2created: "2019-02-18T09:10:52.008665355Z" 2created: "2019-02-18T09:22:24.030382527Z"
3creator: [email protected] 3creator: [email protected]
4source: crates/ra_ide_api/src/completion/completion_item.rs 4source: crates/ra_ide_api/src/completion/completion_item.rs
5expression: kind_completions 5expression: kind_completions
@@ -8,27 +8,15 @@ expression: kind_completions
8 CompletionItem { 8 CompletionItem {
9 label: "self", 9 label: "self",
10 source_range: [20; 20), 10 source_range: [20; 20),
11 text_edit: TextEdit { 11 delete: [20; 20),
12 atoms: [ 12 insert: "self",
13 AtomTextEdit {
14 delete: [20; 20),
15 insert: "self"
16 }
17 ]
18 },
19 kind: Keyword 13 kind: Keyword
20 }, 14 },
21 CompletionItem { 15 CompletionItem {
22 label: "super", 16 label: "super",
23 source_range: [20; 20), 17 source_range: [20; 20),
24 text_edit: TextEdit { 18 delete: [20; 20),
25 atoms: [ 19 insert: "super::",
26 AtomTextEdit {
27 delete: [20; 20),
28 insert: "super::"
29 }
30 ]
31 },
32 kind: Keyword 20 kind: Keyword
33 } 21 }
34] 22]
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__keywords_in_use_stmt3.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__keywords_in_use_stmt3.snap
index 9f0731aa1..b44db276e 100644
--- a/crates/ra_ide_api/src/completion/snapshots/completion_item__keywords_in_use_stmt3.snap
+++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__keywords_in_use_stmt3.snap
@@ -1,5 +1,5 @@
1--- 1---
2created: "2019-02-18T09:10:52.032133616Z" 2created: "2019-02-18T09:22:24.073607133Z"
3creator: [email protected] 3creator: [email protected]
4source: crates/ra_ide_api/src/completion/completion_item.rs 4source: crates/ra_ide_api/src/completion/completion_item.rs
5expression: kind_completions 5expression: kind_completions
@@ -8,27 +8,15 @@ expression: kind_completions
8 CompletionItem { 8 CompletionItem {
9 label: "self", 9 label: "self",
10 source_range: [24; 24), 10 source_range: [24; 24),
11 text_edit: TextEdit { 11 delete: [24; 24),
12 atoms: [ 12 insert: "self",
13 AtomTextEdit {
14 delete: [24; 24),
15 insert: "self"
16 }
17 ]
18 },
19 kind: Keyword 13 kind: Keyword
20 }, 14 },
21 CompletionItem { 15 CompletionItem {
22 label: "super", 16 label: "super",
23 source_range: [24; 24), 17 source_range: [24; 24),
24 text_edit: TextEdit { 18 delete: [24; 24),
25 atoms: [ 19 insert: "super::",
26 AtomTextEdit {
27 delete: [24; 24),
28 insert: "super::"
29 }
30 ]
31 },
32 kind: Keyword 20 kind: Keyword
33 } 21 }
34] 22]
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__last_return_in_block_has_semi1.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__last_return_in_block_has_semi1.snap
index 7d90ef4f3..f220d35c2 100644
--- a/crates/ra_ide_api/src/completion/snapshots/completion_item__last_return_in_block_has_semi1.snap
+++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__last_return_in_block_has_semi1.snap
@@ -1,5 +1,5 @@
1--- 1---
2created: "2019-02-18T09:10:51.985317165Z" 2created: "2019-02-18T09:22:23.989188654Z"
3creator: [email protected] 3creator: [email protected]
4source: crates/ra_ide_api/src/completion/completion_item.rs 4source: crates/ra_ide_api/src/completion/completion_item.rs
5expression: kind_completions 5expression: kind_completions
@@ -8,66 +8,36 @@ expression: kind_completions
8 CompletionItem { 8 CompletionItem {
9 label: "if", 9 label: "if",
10 source_range: [83; 83), 10 source_range: [83; 83),
11 text_edit: TextEdit { 11 delete: [83; 83),
12 atoms: [ 12 insert: "if $0 {}",
13 AtomTextEdit {
14 delete: [83; 83),
15 insert: "if $0 {}"
16 }
17 ]
18 },
19 kind: Keyword 13 kind: Keyword
20 }, 14 },
21 CompletionItem { 15 CompletionItem {
22 label: "loop", 16 label: "loop",
23 source_range: [83; 83), 17 source_range: [83; 83),
24 text_edit: TextEdit { 18 delete: [83; 83),
25 atoms: [ 19 insert: "loop {$0}",
26 AtomTextEdit {
27 delete: [83; 83),
28 insert: "loop {$0}"
29 }
30 ]
31 },
32 kind: Keyword 20 kind: Keyword
33 }, 21 },
34 CompletionItem { 22 CompletionItem {
35 label: "match", 23 label: "match",
36 source_range: [83; 83), 24 source_range: [83; 83),
37 text_edit: TextEdit { 25 delete: [83; 83),
38 atoms: [ 26 insert: "match $0 {}",
39 AtomTextEdit {
40 delete: [83; 83),
41 insert: "match $0 {}"
42 }
43 ]
44 },
45 kind: Keyword 27 kind: Keyword
46 }, 28 },
47 CompletionItem { 29 CompletionItem {
48 label: "return", 30 label: "return",
49 source_range: [83; 83), 31 source_range: [83; 83),
50 text_edit: TextEdit { 32 delete: [83; 83),
51 atoms: [ 33 insert: "return $0;",
52 AtomTextEdit {
53 delete: [83; 83),
54 insert: "return $0;"
55 }
56 ]
57 },
58 kind: Keyword 34 kind: Keyword
59 }, 35 },
60 CompletionItem { 36 CompletionItem {
61 label: "while", 37 label: "while",
62 source_range: [83; 83), 38 source_range: [83; 83),
63 text_edit: TextEdit { 39 delete: [83; 83),
64 atoms: [ 40 insert: "while $0 {}",
65 AtomTextEdit {
66 delete: [83; 83),
67 insert: "while $0 {}"
68 }
69 ]
70 },
71 kind: Keyword 41 kind: Keyword
72 } 42 }
73] 43]
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__last_return_in_block_has_semi2.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__last_return_in_block_has_semi2.snap
index 94e3a2dcb..d2093acdf 100644
--- a/crates/ra_ide_api/src/completion/snapshots/completion_item__last_return_in_block_has_semi2.snap
+++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__last_return_in_block_has_semi2.snap
@@ -1,5 +1,5 @@
1--- 1---
2created: "2019-02-18T09:10:52.013549824Z" 2created: "2019-02-18T09:22:24.036383875Z"
3creator: [email protected] 3creator: [email protected]
4source: crates/ra_ide_api/src/completion/completion_item.rs 4source: crates/ra_ide_api/src/completion/completion_item.rs
5expression: kind_completions 5expression: kind_completions
@@ -8,66 +8,36 @@ expression: kind_completions
8 CompletionItem { 8 CompletionItem {
9 label: "if", 9 label: "if",
10 source_range: [83; 83), 10 source_range: [83; 83),
11 text_edit: TextEdit { 11 delete: [83; 83),
12 atoms: [ 12 insert: "if $0 {}",
13 AtomTextEdit {
14 delete: [83; 83),
15 insert: "if $0 {}"
16 }
17 ]
18 },
19 kind: Keyword 13 kind: Keyword
20 }, 14 },
21 CompletionItem { 15 CompletionItem {
22 label: "loop", 16 label: "loop",
23 source_range: [83; 83), 17 source_range: [83; 83),
24 text_edit: TextEdit { 18 delete: [83; 83),
25 atoms: [ 19 insert: "loop {$0}",
26 AtomTextEdit {
27 delete: [83; 83),
28 insert: "loop {$0}"
29 }
30 ]
31 },
32 kind: Keyword 20 kind: Keyword
33 }, 21 },
34 CompletionItem { 22 CompletionItem {
35 label: "match", 23 label: "match",
36 source_range: [83; 83), 24 source_range: [83; 83),
37 text_edit: TextEdit { 25 delete: [83; 83),
38 atoms: [ 26 insert: "match $0 {}",
39 AtomTextEdit {
40 delete: [83; 83),
41 insert: "match $0 {}"
42 }
43 ]
44 },
45 kind: Keyword 27 kind: Keyword
46 }, 28 },
47 CompletionItem { 29 CompletionItem {
48 label: "return", 30 label: "return",
49 source_range: [83; 83), 31 source_range: [83; 83),
50 text_edit: TextEdit { 32 delete: [83; 83),
51 atoms: [ 33 insert: "return $0;",
52 AtomTextEdit {
53 delete: [83; 83),
54 insert: "return $0;"
55 }
56 ]
57 },
58 kind: Keyword 34 kind: Keyword
59 }, 35 },
60 CompletionItem { 36 CompletionItem {
61 label: "while", 37 label: "while",
62 source_range: [83; 83), 38 source_range: [83; 83),
63 text_edit: TextEdit { 39 delete: [83; 83),
64 atoms: [ 40 insert: "while $0 {}",
65 AtomTextEdit {
66 delete: [83; 83),
67 insert: "while $0 {}"
68 }
69 ]
70 },
71 kind: Keyword 41 kind: Keyword
72 } 42 }
73] 43]
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__method_attr_filtering.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__method_attr_filtering.snap
index 9e4062641..ce8af2159 100644
--- a/crates/ra_ide_api/src/completion/snapshots/completion_item__method_attr_filtering.snap
+++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__method_attr_filtering.snap
@@ -1,5 +1,5 @@
1--- 1---
2created: "2019-02-18T09:10:51.944926087Z" 2created: "2019-02-18T09:22:23.941335305Z"
3creator: [email protected] 3creator: [email protected]
4source: crates/ra_ide_api/src/completion/completion_item.rs 4source: crates/ra_ide_api/src/completion/completion_item.rs
5expression: kind_completions 5expression: kind_completions
@@ -8,14 +8,8 @@ expression: kind_completions
8 CompletionItem { 8 CompletionItem {
9 label: "the_method", 9 label: "the_method",
10 source_range: [249; 249), 10 source_range: [249; 249),
11 text_edit: TextEdit { 11 delete: [249; 249),
12 atoms: [ 12 insert: "the_method()$0",
13 AtomTextEdit {
14 delete: [249; 249),
15 insert: "the_method()$0"
16 }
17 ]
18 },
19 kind: Method, 13 kind: Method,
20 detail: "fn the_method(&self)" 14 detail: "fn the_method(&self)"
21 } 15 }
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__method_completion.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__method_completion.snap
index f8b142b71..41a10de14 100644
--- a/crates/ra_ide_api/src/completion/snapshots/completion_item__method_completion.snap
+++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__method_completion.snap
@@ -1,5 +1,5 @@
1--- 1---
2created: "2019-02-18T09:10:51.944760801Z" 2created: "2019-02-18T09:22:23.939676100Z"
3creator: [email protected] 3creator: [email protected]
4source: crates/ra_ide_api/src/completion/completion_item.rs 4source: crates/ra_ide_api/src/completion/completion_item.rs
5expression: kind_completions 5expression: kind_completions
@@ -8,14 +8,8 @@ expression: kind_completions
8 CompletionItem { 8 CompletionItem {
9 label: "the_method", 9 label: "the_method",
10 source_range: [144; 144), 10 source_range: [144; 144),
11 text_edit: TextEdit { 11 delete: [144; 144),
12 atoms: [ 12 insert: "the_method()$0",
13 AtomTextEdit {
14 delete: [144; 144),
15 insert: "the_method()$0"
16 }
17 ]
18 },
19 kind: Method, 13 kind: Method,
20 detail: "fn the_method(&self)" 14 detail: "fn the_method(&self)"
21 } 15 }
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__mod_with_docs.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__mod_with_docs.snap
index 670803b6f..1da3c3ba2 100644
--- a/crates/ra_ide_api/src/completion/snapshots/completion_item__mod_with_docs.snap
+++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__mod_with_docs.snap
@@ -1,5 +1,5 @@
1--- 1---
2created: "2019-02-18T09:10:52.036530210Z" 2created: "2019-02-18T09:22:24.066918191Z"
3creator: [email protected] 3creator: [email protected]
4source: crates/ra_ide_api/src/completion/completion_item.rs 4source: crates/ra_ide_api/src/completion/completion_item.rs
5expression: kind_completions 5expression: kind_completions
@@ -8,14 +8,8 @@ expression: kind_completions
8 CompletionItem { 8 CompletionItem {
9 label: "my", 9 label: "my",
10 source_range: [23; 25), 10 source_range: [23; 25),
11 text_edit: TextEdit { 11 delete: [23; 25),
12 atoms: [ 12 insert: "my",
13 AtomTextEdit {
14 delete: [23; 25),
15 insert: "my"
16 }
17 ]
18 },
19 kind: Module, 13 kind: Module,
20 documentation: Documentation( 14 documentation: Documentation(
21 "Some simple\ndocs describing `mod my`." 15 "Some simple\ndocs describing `mod my`."
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__module_items.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__module_items.snap
index d082a9c2f..86bc8679d 100644
--- a/crates/ra_ide_api/src/completion/snapshots/completion_item__module_items.snap
+++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__module_items.snap
@@ -1,5 +1,5 @@
1--- 1---
2created: "2019-02-18T09:10:52.120932427Z" 2created: "2019-02-18T09:22:24.161888678Z"
3creator: [email protected] 3creator: [email protected]
4source: crates/ra_ide_api/src/completion/completion_item.rs 4source: crates/ra_ide_api/src/completion/completion_item.rs
5expression: kind_completions 5expression: kind_completions
@@ -8,40 +8,22 @@ expression: kind_completions
8 CompletionItem { 8 CompletionItem {
9 label: "Baz", 9 label: "Baz",
10 source_range: [89; 89), 10 source_range: [89; 89),
11 text_edit: TextEdit { 11 delete: [89; 89),
12 atoms: [ 12 insert: "Baz",
13 AtomTextEdit {
14 delete: [89; 89),
15 insert: "Baz"
16 }
17 ]
18 },
19 kind: Enum 13 kind: Enum
20 }, 14 },
21 CompletionItem { 15 CompletionItem {
22 label: "Foo", 16 label: "Foo",
23 source_range: [89; 89), 17 source_range: [89; 89),
24 text_edit: TextEdit { 18 delete: [89; 89),
25 atoms: [ 19 insert: "Foo",
26 AtomTextEdit {
27 delete: [89; 89),
28 insert: "Foo"
29 }
30 ]
31 },
32 kind: Struct 20 kind: Struct
33 }, 21 },
34 CompletionItem { 22 CompletionItem {
35 label: "quux", 23 label: "quux",
36 source_range: [89; 89), 24 source_range: [89; 89),
37 text_edit: TextEdit { 25 delete: [89; 89),
38 atoms: [ 26 insert: "quux()$0",
39 AtomTextEdit {
40 delete: [89; 89),
41 insert: "quux()$0"
42 }
43 ]
44 },
45 kind: Function, 27 kind: Function,
46 detail: "fn quux()" 28 detail: "fn quux()"
47 } 29 }
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__module_items_in_nested_modules.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__module_items_in_nested_modules.snap
index daa3026fa..9f796b7ca 100644
--- a/crates/ra_ide_api/src/completion/snapshots/completion_item__module_items_in_nested_modules.snap
+++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__module_items_in_nested_modules.snap
@@ -1,5 +1,5 @@
1--- 1---
2created: "2019-02-18T09:10:52.120931050Z" 2created: "2019-02-18T09:22:24.180517419Z"
3creator: [email protected] 3creator: [email protected]
4source: crates/ra_ide_api/src/completion/completion_item.rs 4source: crates/ra_ide_api/src/completion/completion_item.rs
5expression: kind_completions 5expression: kind_completions
@@ -8,27 +8,15 @@ expression: kind_completions
8 CompletionItem { 8 CompletionItem {
9 label: "Bar", 9 label: "Bar",
10 source_range: [101; 101), 10 source_range: [101; 101),
11 text_edit: TextEdit { 11 delete: [101; 101),
12 atoms: [ 12 insert: "Bar",
13 AtomTextEdit {
14 delete: [101; 101),
15 insert: "Bar"
16 }
17 ]
18 },
19 kind: Struct 13 kind: Struct
20 }, 14 },
21 CompletionItem { 15 CompletionItem {
22 label: "quux", 16 label: "quux",
23 source_range: [101; 101), 17 source_range: [101; 101),
24 text_edit: TextEdit { 18 delete: [101; 101),
25 atoms: [ 19 insert: "quux()$0",
26 AtomTextEdit {
27 delete: [101; 101),
28 insert: "quux()$0"
29 }
30 ]
31 },
32 kind: Function, 20 kind: Function,
33 detail: "fn quux()" 21 detail: "fn quux()"
34 } 22 }
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__nested_use_tree.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__nested_use_tree.snap
index 0536d2cd5..4920e500e 100644
--- a/crates/ra_ide_api/src/completion/snapshots/completion_item__nested_use_tree.snap
+++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__nested_use_tree.snap
@@ -1,5 +1,5 @@
1--- 1---
2created: "2019-02-18T09:10:52.039178133Z" 2created: "2019-02-18T09:22:24.085605313Z"
3creator: [email protected] 3creator: [email protected]
4source: crates/ra_ide_api/src/completion/completion_item.rs 4source: crates/ra_ide_api/src/completion/completion_item.rs
5expression: kind_completions 5expression: kind_completions
@@ -8,27 +8,15 @@ expression: kind_completions
8 CompletionItem { 8 CompletionItem {
9 label: "Spam", 9 label: "Spam",
10 source_range: [12; 14), 10 source_range: [12; 14),
11 text_edit: TextEdit { 11 delete: [12; 14),
12 atoms: [ 12 insert: "Spam",
13 AtomTextEdit {
14 delete: [12; 14),
15 insert: "Spam"
16 }
17 ]
18 },
19 kind: Struct 13 kind: Struct
20 }, 14 },
21 CompletionItem { 15 CompletionItem {
22 label: "foo", 16 label: "foo",
23 source_range: [12; 14), 17 source_range: [12; 14),
24 text_edit: TextEdit { 18 delete: [12; 14),
25 atoms: [ 19 insert: "foo",
26 AtomTextEdit {
27 delete: [12; 14),
28 insert: "foo"
29 }
30 ]
31 },
32 kind: Module 20 kind: Module
33 } 21 }
34] 22]
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__no_semi_after_break_continue_in_expr.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__no_semi_after_break_continue_in_expr.snap
index 42f736d74..038e7f402 100644
--- a/crates/ra_ide_api/src/completion/snapshots/completion_item__no_semi_after_break_continue_in_expr.snap
+++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__no_semi_after_break_continue_in_expr.snap
@@ -1,5 +1,5 @@
1--- 1---
2created: "2019-02-18T09:10:51.988658363Z" 2created: "2019-02-18T09:22:23.999953358Z"
3creator: [email protected] 3creator: [email protected]
4source: crates/ra_ide_api/src/completion/completion_item.rs 4source: crates/ra_ide_api/src/completion/completion_item.rs
5expression: kind_completions 5expression: kind_completions
@@ -8,92 +8,50 @@ expression: kind_completions
8 CompletionItem { 8 CompletionItem {
9 label: "break", 9 label: "break",
10 source_range: [106; 108), 10 source_range: [106; 108),
11 text_edit: TextEdit { 11 delete: [106; 108),
12 atoms: [ 12 insert: "break",
13 AtomTextEdit {
14 delete: [106; 108),
15 insert: "break"
16 }
17 ]
18 },
19 kind: Keyword 13 kind: Keyword
20 }, 14 },
21 CompletionItem { 15 CompletionItem {
22 label: "continue", 16 label: "continue",
23 source_range: [106; 108), 17 source_range: [106; 108),
24 text_edit: TextEdit { 18 delete: [106; 108),
25 atoms: [ 19 insert: "continue",
26 AtomTextEdit {
27 delete: [106; 108),
28 insert: "continue"
29 }
30 ]
31 },
32 kind: Keyword 20 kind: Keyword
33 }, 21 },
34 CompletionItem { 22 CompletionItem {
35 label: "if", 23 label: "if",
36 source_range: [106; 108), 24 source_range: [106; 108),
37 text_edit: TextEdit { 25 delete: [106; 108),
38 atoms: [ 26 insert: "if $0 {}",
39 AtomTextEdit {
40 delete: [106; 108),
41 insert: "if $0 {}"
42 }
43 ]
44 },
45 kind: Keyword 27 kind: Keyword
46 }, 28 },
47 CompletionItem { 29 CompletionItem {
48 label: "loop", 30 label: "loop",
49 source_range: [106; 108), 31 source_range: [106; 108),
50 text_edit: TextEdit { 32 delete: [106; 108),
51 atoms: [ 33 insert: "loop {$0}",
52 AtomTextEdit {
53 delete: [106; 108),
54 insert: "loop {$0}"
55 }
56 ]
57 },
58 kind: Keyword 34 kind: Keyword
59 }, 35 },
60 CompletionItem { 36 CompletionItem {
61 label: "match", 37 label: "match",
62 source_range: [106; 108), 38 source_range: [106; 108),
63 text_edit: TextEdit { 39 delete: [106; 108),
64 atoms: [ 40 insert: "match $0 {}",
65 AtomTextEdit {
66 delete: [106; 108),
67 insert: "match $0 {}"
68 }
69 ]
70 },
71 kind: Keyword 41 kind: Keyword
72 }, 42 },
73 CompletionItem { 43 CompletionItem {
74 label: "return", 44 label: "return",
75 source_range: [106; 108), 45 source_range: [106; 108),
76 text_edit: TextEdit { 46 delete: [106; 108),
77 atoms: [ 47 insert: "return",
78 AtomTextEdit {
79 delete: [106; 108),
80 insert: "return"
81 }
82 ]
83 },
84 kind: Keyword 48 kind: Keyword
85 }, 49 },
86 CompletionItem { 50 CompletionItem {
87 label: "while", 51 label: "while",
88 source_range: [106; 108), 52 source_range: [106; 108),
89 text_edit: TextEdit { 53 delete: [106; 108),
90 atoms: [ 54 insert: "while $0 {}",
91 AtomTextEdit {
92 delete: [106; 108),
93 insert: "while $0 {}"
94 }
95 ]
96 },
97 kind: Keyword 55 kind: Keyword
98 } 56 }
99] 57]
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__param_completion_last_param.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__param_completion_last_param.snap
index 0c651f26e..cab77f5a2 100644
--- a/crates/ra_ide_api/src/completion/snapshots/completion_item__param_completion_last_param.snap
+++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__param_completion_last_param.snap
@@ -1,5 +1,5 @@
1--- 1---
2created: "2019-02-18T09:10:51.951199574Z" 2created: "2019-02-18T09:22:23.949634602Z"
3creator: [email protected] 3creator: [email protected]
4source: crates/ra_ide_api/src/completion/completion_item.rs 4source: crates/ra_ide_api/src/completion/completion_item.rs
5expression: kind_completions 5expression: kind_completions
@@ -8,14 +8,8 @@ expression: kind_completions
8 CompletionItem { 8 CompletionItem {
9 label: "file_id: FileId", 9 label: "file_id: FileId",
10 source_range: [98; 102), 10 source_range: [98; 102),
11 text_edit: TextEdit { 11 delete: [98; 102),
12 atoms: [ 12 insert: "file_id: FileId",
13 AtomTextEdit {
14 delete: [98; 102),
15 insert: "file_id: FileId"
16 }
17 ]
18 },
19 lookup: "file_id" 13 lookup: "file_id"
20 } 14 }
21] 15]
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__param_completion_nth_param.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__param_completion_nth_param.snap
index 1064e28c5..8fbee160c 100644
--- a/crates/ra_ide_api/src/completion/snapshots/completion_item__param_completion_nth_param.snap
+++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__param_completion_nth_param.snap
@@ -1,5 +1,5 @@
1--- 1---
2created: "2019-02-18T09:10:51.951199556Z" 2created: "2019-02-18T09:22:23.949634355Z"
3creator: [email protected] 3creator: [email protected]
4source: crates/ra_ide_api/src/completion/completion_item.rs 4source: crates/ra_ide_api/src/completion/completion_item.rs
5expression: kind_completions 5expression: kind_completions
@@ -8,14 +8,8 @@ expression: kind_completions
8 CompletionItem { 8 CompletionItem {
9 label: "file_id: FileId", 9 label: "file_id: FileId",
10 source_range: [98; 102), 10 source_range: [98; 102),
11 text_edit: TextEdit { 11 delete: [98; 102),
12 atoms: [ 12 insert: "file_id: FileId",
13 AtomTextEdit {
14 delete: [98; 102),
15 insert: "file_id: FileId"
16 }
17 ]
18 },
19 lookup: "file_id" 13 lookup: "file_id"
20 } 14 }
21] 15]
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__param_completion_trait_param.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__param_completion_trait_param.snap
index 548c0c9ce..76eeadb6d 100644
--- a/crates/ra_ide_api/src/completion/snapshots/completion_item__param_completion_trait_param.snap
+++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__param_completion_trait_param.snap
@@ -1,5 +1,5 @@
1--- 1---
2created: "2019-02-18T09:10:51.973234775Z" 2created: "2019-02-18T09:22:23.974417169Z"
3creator: [email protected] 3creator: [email protected]
4source: crates/ra_ide_api/src/completion/completion_item.rs 4source: crates/ra_ide_api/src/completion/completion_item.rs
5expression: kind_completions 5expression: kind_completions
@@ -8,14 +8,8 @@ expression: kind_completions
8 CompletionItem { 8 CompletionItem {
9 label: "file_id: FileId", 9 label: "file_id: FileId",
10 source_range: [269; 273), 10 source_range: [269; 273),
11 text_edit: TextEdit { 11 delete: [269; 273),
12 atoms: [ 12 insert: "file_id: FileId",
13 AtomTextEdit {
14 delete: [269; 273),
15 insert: "file_id: FileId"
16 }
17 ]
18 },
19 lookup: "file_id" 13 lookup: "file_id"
20 } 14 }
21] 15]
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__postfix_completion_works_for_trivial_path_expression.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__postfix_completion_works_for_trivial_path_expression.snap
index fcca19b77..2b5435f0c 100644
--- a/crates/ra_ide_api/src/completion/snapshots/completion_item__postfix_completion_works_for_trivial_path_expression.snap
+++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__postfix_completion_works_for_trivial_path_expression.snap
@@ -1,5 +1,5 @@
1--- 1---
2created: "2019-02-18T09:10:52.087222569Z" 2created: "2019-02-18T09:22:24.127119709Z"
3creator: [email protected] 3creator: [email protected]
4source: crates/ra_ide_api/src/completion/completion_item.rs 4source: crates/ra_ide_api/src/completion/completion_item.rs
5expression: kind_completions 5expression: kind_completions
@@ -8,92 +8,50 @@ expression: kind_completions
8 CompletionItem { 8 CompletionItem {
9 label: "dbg", 9 label: "dbg",
10 source_range: [76; 76), 10 source_range: [76; 76),
11 text_edit: TextEdit { 11 delete: [72; 76),
12 atoms: [ 12 insert: "dbg!(bar)",
13 AtomTextEdit {
14 delete: [72; 76),
15 insert: "dbg!(bar)"
16 }
17 ]
18 },
19 detail: "dbg!(expr)" 13 detail: "dbg!(expr)"
20 }, 14 },
21 CompletionItem { 15 CompletionItem {
22 label: "if", 16 label: "if",
23 source_range: [76; 76), 17 source_range: [76; 76),
24 text_edit: TextEdit { 18 delete: [72; 76),
25 atoms: [ 19 insert: "if bar {$0}",
26 AtomTextEdit {
27 delete: [72; 76),
28 insert: "if bar {$0}"
29 }
30 ]
31 },
32 detail: "if expr {}" 20 detail: "if expr {}"
33 }, 21 },
34 CompletionItem { 22 CompletionItem {
35 label: "match", 23 label: "match",
36 source_range: [76; 76), 24 source_range: [76; 76),
37 text_edit: TextEdit { 25 delete: [72; 76),
38 atoms: [ 26 insert: "match bar {\n${1:_} => {$0\\},\n}",
39 AtomTextEdit {
40 delete: [72; 76),
41 insert: "match bar {\n${1:_} => {$0\\},\n}"
42 }
43 ]
44 },
45 detail: "match expr {}" 27 detail: "match expr {}"
46 }, 28 },
47 CompletionItem { 29 CompletionItem {
48 label: "not", 30 label: "not",
49 source_range: [76; 76), 31 source_range: [76; 76),
50 text_edit: TextEdit { 32 delete: [72; 76),
51 atoms: [ 33 insert: "!bar",
52 AtomTextEdit {
53 delete: [72; 76),
54 insert: "!bar"
55 }
56 ]
57 },
58 detail: "!expr" 34 detail: "!expr"
59 }, 35 },
60 CompletionItem { 36 CompletionItem {
61 label: "ref", 37 label: "ref",
62 source_range: [76; 76), 38 source_range: [76; 76),
63 text_edit: TextEdit { 39 delete: [72; 76),
64 atoms: [ 40 insert: "&bar",
65 AtomTextEdit {
66 delete: [72; 76),
67 insert: "&bar"
68 }
69 ]
70 },
71 detail: "&expr" 41 detail: "&expr"
72 }, 42 },
73 CompletionItem { 43 CompletionItem {
74 label: "refm", 44 label: "refm",
75 source_range: [76; 76), 45 source_range: [76; 76),
76 text_edit: TextEdit { 46 delete: [72; 76),
77 atoms: [ 47 insert: "&mut bar",
78 AtomTextEdit {
79 delete: [72; 76),
80 insert: "&mut bar"
81 }
82 ]
83 },
84 detail: "&mut expr" 48 detail: "&mut expr"
85 }, 49 },
86 CompletionItem { 50 CompletionItem {
87 label: "while", 51 label: "while",
88 source_range: [76; 76), 52 source_range: [76; 76),
89 text_edit: TextEdit { 53 delete: [72; 76),
90 atoms: [ 54 insert: "while bar {\n$0\n}",
91 AtomTextEdit {
92 delete: [72; 76),
93 insert: "while bar {\n$0\n}"
94 }
95 ]
96 },
97 detail: "while expr {}" 55 detail: "while expr {}"
98 } 56 }
99] 57]
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__return_type.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__return_type.snap
index 954d1b4bc..0738cf466 100644
--- a/crates/ra_ide_api/src/completion/snapshots/completion_item__return_type.snap
+++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__return_type.snap
@@ -1,5 +1,5 @@
1--- 1---
2created: "2019-02-18T09:10:52.125606324Z" 2created: "2019-02-18T09:22:24.182964414Z"
3creator: [email protected] 3creator: [email protected]
4source: crates/ra_ide_api/src/completion/completion_item.rs 4source: crates/ra_ide_api/src/completion/completion_item.rs
5expression: kind_completions 5expression: kind_completions
@@ -8,27 +8,15 @@ expression: kind_completions
8 CompletionItem { 8 CompletionItem {
9 label: "Foo", 9 label: "Foo",
10 source_range: [47; 47), 10 source_range: [47; 47),
11 text_edit: TextEdit { 11 delete: [47; 47),
12 atoms: [ 12 insert: "Foo",
13 AtomTextEdit {
14 delete: [47; 47),
15 insert: "Foo"
16 }
17 ]
18 },
19 kind: Struct 13 kind: Struct
20 }, 14 },
21 CompletionItem { 15 CompletionItem {
22 label: "x", 16 label: "x",
23 source_range: [47; 47), 17 source_range: [47; 47),
24 text_edit: TextEdit { 18 delete: [47; 47),
25 atoms: [ 19 insert: "x()$0",
26 AtomTextEdit {
27 delete: [47; 47),
28 insert: "x()$0"
29 }
30 ]
31 },
32 kind: Function, 20 kind: Function,
33 detail: "fn x() ->" 21 detail: "fn x() ->"
34 } 22 }
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__self_in_methods.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__self_in_methods.snap
index 3a88b7fbc..baf12cae1 100644
--- a/crates/ra_ide_api/src/completion/snapshots/completion_item__self_in_methods.snap
+++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__self_in_methods.snap
@@ -1,5 +1,5 @@
1--- 1---
2created: "2019-02-18T09:10:52.129525933Z" 2created: "2019-02-18T09:22:24.174038680Z"
3creator: [email protected] 3creator: [email protected]
4source: crates/ra_ide_api/src/completion/completion_item.rs 4source: crates/ra_ide_api/src/completion/completion_item.rs
5expression: kind_completions 5expression: kind_completions
@@ -8,27 +8,15 @@ expression: kind_completions
8 CompletionItem { 8 CompletionItem {
9 label: "Self", 9 label: "Self",
10 source_range: [25; 25), 10 source_range: [25; 25),
11 text_edit: TextEdit { 11 delete: [25; 25),
12 atoms: [ 12 insert: "Self",
13 AtomTextEdit {
14 delete: [25; 25),
15 insert: "Self"
16 }
17 ]
18 },
19 kind: TypeParam 13 kind: TypeParam
20 }, 14 },
21 CompletionItem { 15 CompletionItem {
22 label: "self", 16 label: "self",
23 source_range: [25; 25), 17 source_range: [25; 25),
24 text_edit: TextEdit { 18 delete: [25; 25),
25 atoms: [ 19 insert: "self",
26 AtomTextEdit {
27 delete: [25; 25),
28 insert: "self"
29 }
30 ]
31 },
32 kind: Binding 20 kind: Binding
33 } 21 }
34] 22]
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__snippets_in_expressions.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__snippets_in_expressions.snap
index 9bd6fe91d..fce2d6479 100644
--- a/crates/ra_ide_api/src/completion/snapshots/completion_item__snippets_in_expressions.snap
+++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__snippets_in_expressions.snap
@@ -1,5 +1,5 @@
1--- 1---
2created: "2019-02-18T09:10:52.156085697Z" 2created: "2019-02-18T09:22:24.191576723Z"
3creator: [email protected] 3creator: [email protected]
4source: crates/ra_ide_api/src/completion/completion_item.rs 4source: crates/ra_ide_api/src/completion/completion_item.rs
5expression: kind_completions 5expression: kind_completions
@@ -8,27 +8,15 @@ expression: kind_completions
8 CompletionItem { 8 CompletionItem {
9 label: "pd", 9 label: "pd",
10 source_range: [17; 17), 10 source_range: [17; 17),
11 text_edit: TextEdit { 11 delete: [17; 17),
12 atoms: [ 12 insert: "eprintln!(\"$0 = {:?}\", $0);",
13 AtomTextEdit {
14 delete: [17; 17),
15 insert: "eprintln!(\"$0 = {:?}\", $0);"
16 }
17 ]
18 },
19 kind: Snippet 13 kind: Snippet
20 }, 14 },
21 CompletionItem { 15 CompletionItem {
22 label: "ppd", 16 label: "ppd",
23 source_range: [17; 17), 17 source_range: [17; 17),
24 text_edit: TextEdit { 18 delete: [17; 17),
25 atoms: [ 19 insert: "eprintln!(\"$0 = {:#?}\", $0);",
26 AtomTextEdit {
27 delete: [17; 17),
28 insert: "eprintln!(\"$0 = {:#?}\", $0);"
29 }
30 ]
31 },
32 kind: Snippet 20 kind: Snippet
33 } 21 }
34] 22]
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__snippets_in_items.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__snippets_in_items.snap
index 486b353ef..d2b1a5f0e 100644
--- a/crates/ra_ide_api/src/completion/snapshots/completion_item__snippets_in_items.snap
+++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__snippets_in_items.snap
@@ -1,5 +1,5 @@
1--- 1---
2created: "2019-02-18T09:10:52.152402422Z" 2created: "2019-02-18T09:22:24.187670733Z"
3creator: [email protected] 3creator: [email protected]
4source: crates/ra_ide_api/src/completion/completion_item.rs 4source: crates/ra_ide_api/src/completion/completion_item.rs
5expression: kind_completions 5expression: kind_completions
@@ -8,28 +8,16 @@ expression: kind_completions
8 CompletionItem { 8 CompletionItem {
9 label: "Test function", 9 label: "Test function",
10 source_range: [66; 66), 10 source_range: [66; 66),
11 text_edit: TextEdit { 11 delete: [66; 66),
12 atoms: [ 12 insert: "#[test]\nfn ${1:feature}() {\n $0\n}",
13 AtomTextEdit {
14 delete: [66; 66),
15 insert: "#[test]\nfn ${1:feature}() {\n $0\n}"
16 }
17 ]
18 },
19 kind: Snippet, 13 kind: Snippet,
20 lookup: "tfn" 14 lookup: "tfn"
21 }, 15 },
22 CompletionItem { 16 CompletionItem {
23 label: "pub(crate)", 17 label: "pub(crate)",
24 source_range: [66; 66), 18 source_range: [66; 66),
25 text_edit: TextEdit { 19 delete: [66; 66),
26 atoms: [ 20 insert: "pub(crate) $0",
27 AtomTextEdit {
28 delete: [66; 66),
29 insert: "pub(crate) $0"
30 }
31 ]
32 },
33 kind: Snippet 21 kind: Snippet
34 } 22 }
35] 23]
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__struct_associated_const.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__struct_associated_const.snap
index b34f6f26f..6ad4c5acc 100644
--- a/crates/ra_ide_api/src/completion/snapshots/completion_item__struct_associated_const.snap
+++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__struct_associated_const.snap
@@ -1,5 +1,5 @@
1--- 1---
2created: "2019-02-18T09:10:52.050659483Z" 2created: "2019-02-18T09:22:24.093406123Z"
3creator: [email protected] 3creator: [email protected]
4source: crates/ra_ide_api/src/completion/completion_item.rs 4source: crates/ra_ide_api/src/completion/completion_item.rs
5expression: kind_completions 5expression: kind_completions
@@ -8,14 +8,8 @@ expression: kind_completions
8 CompletionItem { 8 CompletionItem {
9 label: "C", 9 label: "C",
10 source_range: [107; 107), 10 source_range: [107; 107),
11 text_edit: TextEdit { 11 delete: [107; 107),
12 atoms: [ 12 insert: "C",
13 AtomTextEdit {
14 delete: [107; 107),
15 insert: "C"
16 }
17 ]
18 },
19 kind: Const, 13 kind: Const,
20 detail: "const C: i32 = 42;", 14 detail: "const C: i32 = 42;",
21 documentation: Documentation( 15 documentation: Documentation(
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__struct_associated_method.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__struct_associated_method.snap
index f6c95074a..163b325c3 100644
--- a/crates/ra_ide_api/src/completion/snapshots/completion_item__struct_associated_method.snap
+++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__struct_associated_method.snap
@@ -1,5 +1,5 @@
1--- 1---
2created: "2019-02-18T09:10:52.050659480Z" 2created: "2019-02-18T09:22:24.093082839Z"
3creator: [email protected] 3creator: [email protected]
4source: crates/ra_ide_api/src/completion/completion_item.rs 4source: crates/ra_ide_api/src/completion/completion_item.rs
5expression: kind_completions 5expression: kind_completions
@@ -8,14 +8,8 @@ expression: kind_completions
8 CompletionItem { 8 CompletionItem {
9 label: "m", 9 label: "m",
10 source_range: [100; 100), 10 source_range: [100; 100),
11 text_edit: TextEdit { 11 delete: [100; 100),
12 atoms: [ 12 insert: "m()$0",
13 AtomTextEdit {
14 delete: [100; 100),
15 insert: "m()$0"
16 }
17 ]
18 },
19 kind: Method, 13 kind: Method,
20 detail: "fn m()", 14 detail: "fn m()",
21 documentation: Documentation( 15 documentation: Documentation(
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__struct_associated_type.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__struct_associated_type.snap
index 79168702c..583bda225 100644
--- a/crates/ra_ide_api/src/completion/snapshots/completion_item__struct_associated_type.snap
+++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__struct_associated_type.snap
@@ -1,5 +1,5 @@
1--- 1---
2created: "2019-02-18T09:10:52.066746177Z" 2created: "2019-02-18T09:22:24.090876030Z"
3creator: [email protected] 3creator: [email protected]
4source: crates/ra_ide_api/src/completion/completion_item.rs 4source: crates/ra_ide_api/src/completion/completion_item.rs
5expression: kind_completions 5expression: kind_completions
@@ -8,14 +8,8 @@ expression: kind_completions
8 CompletionItem { 8 CompletionItem {
9 label: "T", 9 label: "T",
10 source_range: [101; 101), 10 source_range: [101; 101),
11 text_edit: TextEdit { 11 delete: [101; 101),
12 atoms: [ 12 insert: "T",
13 AtomTextEdit {
14 delete: [101; 101),
15 insert: "T"
16 }
17 ]
18 },
19 kind: TypeAlias, 13 kind: TypeAlias,
20 detail: "type T = i32;", 14 detail: "type T = i32;",
21 documentation: Documentation( 15 documentation: Documentation(
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__struct_field_completion.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__struct_field_completion.snap
index f22bbd987..58271b873 100644
--- a/crates/ra_ide_api/src/completion/snapshots/completion_item__struct_field_completion.snap
+++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__struct_field_completion.snap
@@ -1,5 +1,5 @@
1--- 1---
2created: "2019-02-18T09:10:51.944776686Z" 2created: "2019-02-18T09:22:23.939645902Z"
3creator: [email protected] 3creator: [email protected]
4source: crates/ra_ide_api/src/completion/completion_item.rs 4source: crates/ra_ide_api/src/completion/completion_item.rs
5expression: kind_completions 5expression: kind_completions
@@ -8,14 +8,8 @@ expression: kind_completions
8 CompletionItem { 8 CompletionItem {
9 label: "the_field", 9 label: "the_field",
10 source_range: [85; 85), 10 source_range: [85; 85),
11 text_edit: TextEdit { 11 delete: [85; 85),
12 atoms: [ 12 insert: "the_field",
13 AtomTextEdit {
14 delete: [85; 85),
15 insert: "the_field"
16 }
17 ]
18 },
19 kind: Field, 13 kind: Field,
20 detail: "u32" 14 detail: "u32"
21 } 15 }
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__struct_field_completion_autoderef.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__struct_field_completion_autoderef.snap
index 8b53d5e95..b38867b81 100644
--- a/crates/ra_ide_api/src/completion/snapshots/completion_item__struct_field_completion_autoderef.snap
+++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__struct_field_completion_autoderef.snap
@@ -1,5 +1,5 @@
1--- 1---
2created: "2019-02-18T09:10:51.944780241Z" 2created: "2019-02-18T09:22:23.940872916Z"
3creator: [email protected] 3creator: [email protected]
4source: crates/ra_ide_api/src/completion/completion_item.rs 4source: crates/ra_ide_api/src/completion/completion_item.rs
5expression: kind_completions 5expression: kind_completions
@@ -8,28 +8,16 @@ expression: kind_completions
8 CompletionItem { 8 CompletionItem {
9 label: "foo", 9 label: "foo",
10 source_range: [126; 126), 10 source_range: [126; 126),
11 text_edit: TextEdit { 11 delete: [126; 126),
12 atoms: [ 12 insert: "foo()$0",
13 AtomTextEdit {
14 delete: [126; 126),
15 insert: "foo()$0"
16 }
17 ]
18 },
19 kind: Method, 13 kind: Method,
20 detail: "fn foo(&self)" 14 detail: "fn foo(&self)"
21 }, 15 },
22 CompletionItem { 16 CompletionItem {
23 label: "the_field", 17 label: "the_field",
24 source_range: [126; 126), 18 source_range: [126; 126),
25 text_edit: TextEdit { 19 delete: [126; 126),
26 atoms: [ 20 insert: "the_field",
27 AtomTextEdit {
28 delete: [126; 126),
29 insert: "the_field"
30 }
31 ]
32 },
33 kind: Field, 21 kind: Field,
34 detail: "(u32, i32)" 22 detail: "(u32, i32)"
35 } 23 }
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__struct_field_completion_self.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__struct_field_completion_self.snap
index f20e4dcab..8e5cab43e 100644
--- a/crates/ra_ide_api/src/completion/snapshots/completion_item__struct_field_completion_self.snap
+++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__struct_field_completion_self.snap
@@ -1,5 +1,5 @@
1--- 1---
2created: "2019-02-18T09:10:51.944941588Z" 2created: "2019-02-18T09:22:23.940872918Z"
3creator: [email protected] 3creator: [email protected]
4source: crates/ra_ide_api/src/completion/completion_item.rs 4source: crates/ra_ide_api/src/completion/completion_item.rs
5expression: kind_completions 5expression: kind_completions
@@ -8,28 +8,16 @@ expression: kind_completions
8 CompletionItem { 8 CompletionItem {
9 label: "foo", 9 label: "foo",
10 source_range: [187; 187), 10 source_range: [187; 187),
11 text_edit: TextEdit { 11 delete: [187; 187),
12 atoms: [ 12 insert: "foo()$0",
13 AtomTextEdit {
14 delete: [187; 187),
15 insert: "foo()$0"
16 }
17 ]
18 },
19 kind: Method, 13 kind: Method,
20 detail: "fn foo(self)" 14 detail: "fn foo(self)"
21 }, 15 },
22 CompletionItem { 16 CompletionItem {
23 label: "the_field", 17 label: "the_field",
24 source_range: [187; 187), 18 source_range: [187; 187),
25 text_edit: TextEdit { 19 delete: [187; 187),
26 atoms: [ 20 insert: "the_field",
27 AtomTextEdit {
28 delete: [187; 187),
29 insert: "the_field"
30 }
31 ]
32 },
33 kind: Field, 21 kind: Field,
34 detail: "(u32,)", 22 detail: "(u32,)",
35 documentation: Documentation( 23 documentation: Documentation(
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__tuple_field_completion.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__tuple_field_completion.snap
index b1ebac40b..3f2780621 100644
--- a/crates/ra_ide_api/src/completion/snapshots/completion_item__tuple_field_completion.snap
+++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__tuple_field_completion.snap
@@ -1,5 +1,5 @@
1--- 1---
2created: "2019-02-18T09:10:51.944941196Z" 2created: "2019-02-18T09:22:23.939710971Z"
3creator: [email protected] 3creator: [email protected]
4source: crates/ra_ide_api/src/completion/completion_item.rs 4source: crates/ra_ide_api/src/completion/completion_item.rs
5expression: kind_completions 5expression: kind_completions
@@ -8,28 +8,16 @@ expression: kind_completions
8 CompletionItem { 8 CompletionItem {
9 label: "0", 9 label: "0",
10 source_range: [75; 75), 10 source_range: [75; 75),
11 text_edit: TextEdit { 11 delete: [75; 75),
12 atoms: [ 12 insert: "0",
13 AtomTextEdit {
14 delete: [75; 75),
15 insert: "0"
16 }
17 ]
18 },
19 kind: Field, 13 kind: Field,
20 detail: "i32" 14 detail: "i32"
21 }, 15 },
22 CompletionItem { 16 CompletionItem {
23 label: "1", 17 label: "1",
24 source_range: [75; 75), 18 source_range: [75; 75),
25 text_edit: TextEdit { 19 delete: [75; 75),
26 atoms: [ 20 insert: "1",
27 AtomTextEdit {
28 delete: [75; 75),
29 insert: "1"
30 }
31 ]
32 },
33 kind: Field, 21 kind: Field,
34 detail: "f64" 22 detail: "f64"
35 } 23 }
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__use_item_starting_with_crate.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__use_item_starting_with_crate.snap
index 30a67db61..34e70c35d 100644
--- a/crates/ra_ide_api/src/completion/snapshots/completion_item__use_item_starting_with_crate.snap
+++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__use_item_starting_with_crate.snap
@@ -1,5 +1,5 @@
1--- 1---
2created: "2019-02-18T09:10:52.063155992Z" 2created: "2019-02-18T09:22:24.098574884Z"
3creator: [email protected] 3creator: [email protected]
4source: crates/ra_ide_api/src/completion/completion_item.rs 4source: crates/ra_ide_api/src/completion/completion_item.rs
5expression: kind_completions 5expression: kind_completions
@@ -8,27 +8,15 @@ expression: kind_completions
8 CompletionItem { 8 CompletionItem {
9 label: "Spam", 9 label: "Spam",
10 source_range: [11; 13), 10 source_range: [11; 13),
11 text_edit: TextEdit { 11 delete: [11; 13),
12 atoms: [ 12 insert: "Spam",
13 AtomTextEdit {
14 delete: [11; 13),
15 insert: "Spam"
16 }
17 ]
18 },
19 kind: Struct 13 kind: Struct
20 }, 14 },
21 CompletionItem { 15 CompletionItem {
22 label: "foo", 16 label: "foo",
23 source_range: [11; 13), 17 source_range: [11; 13),
24 text_edit: TextEdit { 18 delete: [11; 13),
25 atoms: [ 19 insert: "foo",
26 AtomTextEdit {
27 delete: [11; 13),
28 insert: "foo"
29 }
30 ]
31 },
32 kind: Module 20 kind: Module
33 } 21 }
34] 22]
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__use_item_starting_with_self.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__use_item_starting_with_self.snap
index a8257ef12..d15f1905b 100644
--- a/crates/ra_ide_api/src/completion/snapshots/completion_item__use_item_starting_with_self.snap
+++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__use_item_starting_with_self.snap
@@ -1,5 +1,5 @@
1--- 1---
2created: "2019-02-18T09:10:52.075119580Z" 2created: "2019-02-18T09:22:24.102063333Z"
3creator: [email protected] 3creator: [email protected]
4source: crates/ra_ide_api/src/completion/completion_item.rs 4source: crates/ra_ide_api/src/completion/completion_item.rs
5expression: kind_completions 5expression: kind_completions
@@ -8,14 +8,8 @@ expression: kind_completions
8 CompletionItem { 8 CompletionItem {
9 label: "Bar", 9 label: "Bar",
10 source_range: [26; 26), 10 source_range: [26; 26),
11 text_edit: TextEdit { 11 delete: [26; 26),
12 atoms: [ 12 insert: "Bar",
13 AtomTextEdit {
14 delete: [26; 26),
15 insert: "Bar"
16 }
17 ]
18 },
19 kind: Struct 13 kind: Struct
20 } 14 }
21] 15]