aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide_api/src
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_ide_api/src')
-rw-r--r--crates/ra_ide_api/src/completion/complete_snippet.rs13
-rw-r--r--crates/ra_ide_api/src/completion/completion_context.rs8
-rw-r--r--crates/ra_ide_api/src/completion/snapshots/completion_item__bindings_from_for.snap8
-rw-r--r--crates/ra_ide_api/src/completion/snapshots/completion_item__bindings_from_if_let.snap10
-rw-r--r--crates/ra_ide_api/src/completion/snapshots/completion_item__bindings_from_let.snap10
-rw-r--r--crates/ra_ide_api/src/completion/snapshots/completion_item__completes_break_and_continue_in_loops1.snap18
-rw-r--r--crates/ra_ide_api/src/completion/snapshots/completion_item__completes_break_and_continue_in_loops2.snap14
-rw-r--r--crates/ra_ide_api/src/completion/snapshots/completion_item__dont_add_semi_after_return_if_not_a_statement.snap14
-rw-r--r--crates/ra_ide_api/src/completion/snapshots/completion_item__dont_show_both_completions_for_shadowing.snap8
-rw-r--r--crates/ra_ide_api/src/completion/snapshots/completion_item__filter_postfix_completion3.snap20
-rw-r--r--crates/ra_ide_api/src/completion/snapshots/completion_item__keywords_in_function1.snap14
-rw-r--r--crates/ra_ide_api/src/completion/snapshots/completion_item__keywords_in_function2.snap18
-rw-r--r--crates/ra_ide_api/src/completion/snapshots/completion_item__keywords_in_function3.snap14
-rw-r--r--crates/ra_ide_api/src/completion/snapshots/completion_item__keywords_in_function4.snap14
-rw-r--r--crates/ra_ide_api/src/completion/snapshots/completion_item__keywords_in_use_stmt1.snap10
-rw-r--r--crates/ra_ide_api/src/completion/snapshots/completion_item__keywords_in_use_stmt3.snap8
-rw-r--r--crates/ra_ide_api/src/completion/snapshots/completion_item__last_return_in_block_has_semi1.snap14
-rw-r--r--crates/ra_ide_api/src/completion/snapshots/completion_item__last_return_in_block_has_semi2.snap14
-rw-r--r--crates/ra_ide_api/src/completion/snapshots/completion_item__module_items.snap10
-rw-r--r--crates/ra_ide_api/src/completion/snapshots/completion_item__module_items_in_nested_modules.snap8
-rw-r--r--crates/ra_ide_api/src/completion/snapshots/completion_item__return_type.snap8
-rw-r--r--crates/ra_ide_api/src/completion/snapshots/completion_item__self_in_methods.snap6
-rw-r--r--crates/ra_ide_api/src/completion/snapshots/completion_item__should_not_complete_snippets_in_path.snap5
-rw-r--r--crates/ra_ide_api/src/completion/snapshots/completion_item__should_not_complete_snippets_in_path2.snap5
-rw-r--r--crates/ra_ide_api/src/completion/snapshots/completion_item__snippets_in_expressions.snap8
-rw-r--r--crates/ra_ide_api/src/completion/snapshots/completion_item__snippets_in_items.snap8
26 files changed, 154 insertions, 133 deletions
diff --git a/crates/ra_ide_api/src/completion/complete_snippet.rs b/crates/ra_ide_api/src/completion/complete_snippet.rs
index d3344b865..d1cea7375 100644
--- a/crates/ra_ide_api/src/completion/complete_snippet.rs
+++ b/crates/ra_ide_api/src/completion/complete_snippet.rs
@@ -10,6 +10,7 @@ pub(super) fn complete_expr_snippet(acc: &mut Completions, ctx: &CompletionConte
10 if !(ctx.is_trivial_path && ctx.function_syntax.is_some()) { 10 if !(ctx.is_trivial_path && ctx.function_syntax.is_some()) {
11 return; 11 return;
12 } 12 }
13
13 snippet(ctx, "pd", "eprintln!(\"$0 = {:?}\", $0);").add_to(acc); 14 snippet(ctx, "pd", "eprintln!(\"$0 = {:?}\", $0);").add_to(acc);
14 snippet(ctx, "ppd", "eprintln!(\"$0 = {:#?}\", $0);").add_to(acc); 15 snippet(ctx, "ppd", "eprintln!(\"$0 = {:#?}\", $0);").add_to(acc);
15} 16}
@@ -48,6 +49,18 @@ mod tests {
48 } 49 }
49 50
50 #[test] 51 #[test]
52 fn should_not_complete_snippets_in_path() {
53 check_snippet_completion(
54 "should_not_complete_snippets_in_path",
55 r"fn foo(x: i32) { ::foo<|> }",
56 );
57 check_snippet_completion(
58 "should_not_complete_snippets_in_path2",
59 r"fn foo(x: i32) { ::<|> }",
60 );
61 }
62
63 #[test]
51 fn completes_snippets_in_items() { 64 fn completes_snippets_in_items() {
52 check_snippet_completion( 65 check_snippet_completion(
53 "snippets_in_items", 66 "snippets_in_items",
diff --git a/crates/ra_ide_api/src/completion/completion_context.rs b/crates/ra_ide_api/src/completion/completion_context.rs
index b09c66c18..ca2069e2a 100644
--- a/crates/ra_ide_api/src/completion/completion_context.rs
+++ b/crates/ra_ide_api/src/completion/completion_context.rs
@@ -21,7 +21,7 @@ pub(crate) struct CompletionContext<'a> {
21 pub(super) function_syntax: Option<&'a ast::FnDef>, 21 pub(super) function_syntax: Option<&'a ast::FnDef>,
22 pub(super) use_item_syntax: Option<&'a ast::UseItem>, 22 pub(super) use_item_syntax: Option<&'a ast::UseItem>,
23 pub(super) is_param: bool, 23 pub(super) is_param: bool,
24 /// A single-indent path, like `foo`. 24 /// A single-indent path, like `foo`. `::foo` should not be considered a trivial path.
25 pub(super) is_trivial_path: bool, 25 pub(super) is_trivial_path: bool,
26 /// If not a trivial, path, the prefix (qualifier). 26 /// If not a trivial, path, the prefix (qualifier).
27 pub(super) path_prefix: Option<hir::Path>, 27 pub(super) path_prefix: Option<hir::Path>,
@@ -66,13 +66,11 @@ impl<'a> CompletionContext<'a> {
66 } 66 }
67 67
68 // The range of the identifier that is being completed. 68 // The range of the identifier that is being completed.
69 // This is purely advisory and can be used, for example, to highlight this range in the editor.
70 // Clients are expected to ignore this field.
71 pub(crate) fn source_range(&self) -> TextRange { 69 pub(crate) fn source_range(&self) -> TextRange {
72 match self.leaf.kind() { 70 match self.leaf.kind() {
73 // workaroud when completion is triggered by trigger characters. 71 // workaroud when completion is triggered by trigger characters.
74 DOT | COLONCOLON => TextRange::from_to(self.offset, self.offset), 72 IDENT => self.leaf.range(),
75 _ => self.leaf.range(), 73 _ => TextRange::offset_len(self.offset, 0.into()),
76 } 74 }
77 } 75 }
78 76
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 eb806ad62..329309c90 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,8 +1,8 @@
1--- 1---
2created: "2019-01-22T15:38:19.841148300+00:00" 2created: "2019-01-23T07:42:59.656273+00:00"
3creator: [email protected] 3creator: [email protected]
4expression: kind_completions 4expression: kind_completions
5source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs" 5source: crates/ra_ide_api/src/completion/completion_item.rs
6--- 6---
7[ 7[
8 CompletionItem { 8 CompletionItem {
@@ -16,7 +16,7 @@ source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs"
16 lookup: None, 16 lookup: None,
17 insert_text: None, 17 insert_text: None,
18 insert_text_format: PlainText, 18 insert_text_format: PlainText,
19 source_range: [62; 100), 19 source_range: [83; 83),
20 text_edit: None 20 text_edit: None
21 }, 21 },
22 CompletionItem { 22 CompletionItem {
@@ -34,7 +34,7 @@ source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs"
34 "quux()$0" 34 "quux()$0"
35 ), 35 ),
36 insert_text_format: Snippet, 36 insert_text_format: Snippet,
37 source_range: [62; 100), 37 source_range: [83; 83),
38 text_edit: None 38 text_edit: None
39 } 39 }
40] 40]
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 4bb28c7e8..dbbe06c7b 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,8 +1,8 @@
1--- 1---
2created: "2019-01-22T15:38:19.863089100+00:00" 2created: "2019-01-23T07:42:59.658419+00:00"
3creator: [email protected] 3creator: [email protected]
4expression: kind_completions 4expression: kind_completions
5source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs" 5source: crates/ra_ide_api/src/completion/completion_item.rs
6--- 6---
7[ 7[
8 CompletionItem { 8 CompletionItem {
@@ -16,7 +16,7 @@ source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs"
16 lookup: None, 16 lookup: None,
17 insert_text: None, 17 insert_text: None,
18 insert_text_format: PlainText, 18 insert_text_format: PlainText,
19 source_range: [213; 231), 19 source_range: [214; 214),
20 text_edit: None 20 text_edit: None
21 }, 21 },
22 CompletionItem { 22 CompletionItem {
@@ -30,7 +30,7 @@ source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs"
30 lookup: None, 30 lookup: None,
31 insert_text: None, 31 insert_text: None,
32 insert_text_format: PlainText, 32 insert_text_format: PlainText,
33 source_range: [213; 231), 33 source_range: [214; 214),
34 text_edit: None 34 text_edit: None
35 }, 35 },
36 CompletionItem { 36 CompletionItem {
@@ -48,7 +48,7 @@ source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs"
48 "quux()$0" 48 "quux()$0"
49 ), 49 ),
50 insert_text_format: Snippet, 50 insert_text_format: Snippet,
51 source_range: [213; 231), 51 source_range: [214; 214),
52 text_edit: None 52 text_edit: None
53 } 53 }
54] 54]
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 0579d00ec..b727bb70c 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,8 +1,8 @@
1--- 1---
2created: "2019-01-22T15:38:19.881041600+00:00" 2created: "2019-01-23T07:42:59.657713+00:00"
3creator: [email protected] 3creator: [email protected]
4expression: kind_completions 4expression: kind_completions
5source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs" 5source: crates/ra_ide_api/src/completion/completion_item.rs
6--- 6---
7[ 7[
8 CompletionItem { 8 CompletionItem {
@@ -16,7 +16,7 @@ source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs"
16 lookup: None, 16 lookup: None,
17 insert_text: None, 17 insert_text: None,
18 insert_text_format: PlainText, 18 insert_text_format: PlainText,
19 source_range: [78; 79), 19 source_range: [79; 79),
20 text_edit: None 20 text_edit: None
21 }, 21 },
22 CompletionItem { 22 CompletionItem {
@@ -30,7 +30,7 @@ source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs"
30 lookup: None, 30 lookup: None,
31 insert_text: None, 31 insert_text: None,
32 insert_text_format: PlainText, 32 insert_text_format: PlainText,
33 source_range: [78; 79), 33 source_range: [79; 79),
34 text_edit: None 34 text_edit: None
35 }, 35 },
36 CompletionItem { 36 CompletionItem {
@@ -48,7 +48,7 @@ source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs"
48 "quux($0)" 48 "quux($0)"
49 ), 49 ),
50 insert_text_format: Snippet, 50 insert_text_format: Snippet,
51 source_range: [78; 79), 51 source_range: [79; 79),
52 text_edit: None 52 text_edit: None
53 } 53 }
54] 54]
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 2e763fe1d..8dcb773d0 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,8 +1,8 @@
1--- 1---
2created: "2019-01-22T14:45:00.620177400+00:00" 2created: "2019-01-23T05:27:32.197434+00:00"
3creator: [email protected] 3creator: [email protected]
4expression: kind_completions 4expression: kind_completions
5source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs" 5source: crates/ra_ide_api/src/completion/completion_item.rs
6--- 6---
7[ 7[
8 CompletionItem { 8 CompletionItem {
@@ -18,7 +18,7 @@ source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs"
18 "if $0 {}" 18 "if $0 {}"
19 ), 19 ),
20 insert_text_format: Snippet, 20 insert_text_format: Snippet,
21 source_range: [54; 56), 21 source_range: [55; 55),
22 text_edit: None 22 text_edit: None
23 }, 23 },
24 CompletionItem { 24 CompletionItem {
@@ -34,7 +34,7 @@ source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs"
34 "match $0 {}" 34 "match $0 {}"
35 ), 35 ),
36 insert_text_format: Snippet, 36 insert_text_format: Snippet,
37 source_range: [54; 56), 37 source_range: [55; 55),
38 text_edit: None 38 text_edit: None
39 }, 39 },
40 CompletionItem { 40 CompletionItem {
@@ -50,7 +50,7 @@ source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs"
50 "while $0 {}" 50 "while $0 {}"
51 ), 51 ),
52 insert_text_format: Snippet, 52 insert_text_format: Snippet,
53 source_range: [54; 56), 53 source_range: [55; 55),
54 text_edit: None 54 text_edit: None
55 }, 55 },
56 CompletionItem { 56 CompletionItem {
@@ -66,7 +66,7 @@ source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs"
66 "loop {$0}" 66 "loop {$0}"
67 ), 67 ),
68 insert_text_format: Snippet, 68 insert_text_format: Snippet,
69 source_range: [54; 56), 69 source_range: [55; 55),
70 text_edit: None 70 text_edit: None
71 }, 71 },
72 CompletionItem { 72 CompletionItem {
@@ -82,7 +82,7 @@ source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs"
82 "continue;" 82 "continue;"
83 ), 83 ),
84 insert_text_format: Snippet, 84 insert_text_format: Snippet,
85 source_range: [54; 56), 85 source_range: [55; 55),
86 text_edit: None 86 text_edit: None
87 }, 87 },
88 CompletionItem { 88 CompletionItem {
@@ -98,7 +98,7 @@ source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs"
98 "break;" 98 "break;"
99 ), 99 ),
100 insert_text_format: Snippet, 100 insert_text_format: Snippet,
101 source_range: [54; 56), 101 source_range: [55; 55),
102 text_edit: None 102 text_edit: None
103 }, 103 },
104 CompletionItem { 104 CompletionItem {
@@ -114,7 +114,7 @@ source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs"
114 "return $0;" 114 "return $0;"
115 ), 115 ),
116 insert_text_format: Snippet, 116 insert_text_format: Snippet,
117 source_range: [54; 56), 117 source_range: [55; 55),
118 text_edit: None 118 text_edit: None
119 } 119 }
120] 120]
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 9dcdbf63f..1c64c6548 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,8 +1,8 @@
1--- 1---
2created: "2019-01-22T14:45:00.699965300+00:00" 2created: "2019-01-23T05:27:32.314513+00:00"
3creator: [email protected] 3creator: [email protected]
4expression: kind_completions 4expression: kind_completions
5source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs" 5source: crates/ra_ide_api/src/completion/completion_item.rs
6--- 6---
7[ 7[
8 CompletionItem { 8 CompletionItem {
@@ -18,7 +18,7 @@ source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs"
18 "if $0 {}" 18 "if $0 {}"
19 ), 19 ),
20 insert_text_format: Snippet, 20 insert_text_format: Snippet,
21 source_range: [59; 61), 21 source_range: [60; 60),
22 text_edit: None 22 text_edit: None
23 }, 23 },
24 CompletionItem { 24 CompletionItem {
@@ -34,7 +34,7 @@ source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs"
34 "match $0 {}" 34 "match $0 {}"
35 ), 35 ),
36 insert_text_format: Snippet, 36 insert_text_format: Snippet,
37 source_range: [59; 61), 37 source_range: [60; 60),
38 text_edit: None 38 text_edit: None
39 }, 39 },
40 CompletionItem { 40 CompletionItem {
@@ -50,7 +50,7 @@ source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs"
50 "while $0 {}" 50 "while $0 {}"
51 ), 51 ),
52 insert_text_format: Snippet, 52 insert_text_format: Snippet,
53 source_range: [59; 61), 53 source_range: [60; 60),
54 text_edit: None 54 text_edit: None
55 }, 55 },
56 CompletionItem { 56 CompletionItem {
@@ -66,7 +66,7 @@ source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs"
66 "loop {$0}" 66 "loop {$0}"
67 ), 67 ),
68 insert_text_format: Snippet, 68 insert_text_format: Snippet,
69 source_range: [59; 61), 69 source_range: [60; 60),
70 text_edit: None 70 text_edit: None
71 }, 71 },
72 CompletionItem { 72 CompletionItem {
@@ -82,7 +82,7 @@ source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs"
82 "return $0;" 82 "return $0;"
83 ), 83 ),
84 insert_text_format: Snippet, 84 insert_text_format: Snippet,
85 source_range: [59; 61), 85 source_range: [60; 60),
86 text_edit: None 86 text_edit: None
87 } 87 }
88] 88]
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 e3f00d0f1..8c9657b5c 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,8 +1,8 @@
1--- 1---
2created: "2019-01-22T14:45:00.642118600+00:00" 2created: "2019-01-23T05:27:32.197678+00:00"
3creator: [email protected] 3creator: [email protected]
4expression: kind_completions 4expression: kind_completions
5source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs" 5source: crates/ra_ide_api/src/completion/completion_item.rs
6--- 6---
7[ 7[
8 CompletionItem { 8 CompletionItem {
@@ -18,7 +18,7 @@ source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs"
18 "if $0 {}" 18 "if $0 {}"
19 ), 19 ),
20 insert_text_format: Snippet, 20 insert_text_format: Snippet,
21 source_range: [84; 102), 21 source_range: [85; 85),
22 text_edit: None 22 text_edit: None
23 }, 23 },
24 CompletionItem { 24 CompletionItem {
@@ -34,7 +34,7 @@ source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs"
34 "match $0 {}" 34 "match $0 {}"
35 ), 35 ),
36 insert_text_format: Snippet, 36 insert_text_format: Snippet,
37 source_range: [84; 102), 37 source_range: [85; 85),
38 text_edit: None 38 text_edit: None
39 }, 39 },
40 CompletionItem { 40 CompletionItem {
@@ -50,7 +50,7 @@ source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs"
50 "while $0 {}" 50 "while $0 {}"
51 ), 51 ),
52 insert_text_format: Snippet, 52 insert_text_format: Snippet,
53 source_range: [84; 102), 53 source_range: [85; 85),
54 text_edit: None 54 text_edit: None
55 }, 55 },
56 CompletionItem { 56 CompletionItem {
@@ -66,7 +66,7 @@ source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs"
66 "loop {$0}" 66 "loop {$0}"
67 ), 67 ),
68 insert_text_format: Snippet, 68 insert_text_format: Snippet,
69 source_range: [84; 102), 69 source_range: [85; 85),
70 text_edit: None 70 text_edit: None
71 }, 71 },
72 CompletionItem { 72 CompletionItem {
@@ -82,7 +82,7 @@ source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs"
82 "return $0" 82 "return $0"
83 ), 83 ),
84 insert_text_format: Snippet, 84 insert_text_format: Snippet,
85 source_range: [84; 102), 85 source_range: [85; 85),
86 text_edit: None 86 text_edit: None
87 } 87 }
88] 88]
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 3e88d8c8e..8f8a3a56c 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,8 +1,8 @@
1--- 1---
2created: "2019-01-22T15:38:19.914951100+00:00" 2created: "2019-01-23T07:42:59.658375+00:00"
3creator: [email protected] 3creator: [email protected]
4expression: kind_completions 4expression: kind_completions
5source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs" 5source: crates/ra_ide_api/src/completion/completion_item.rs
6--- 6---
7[ 7[
8 CompletionItem { 8 CompletionItem {
@@ -16,7 +16,7 @@ source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs"
16 lookup: None, 16 lookup: None,
17 insert_text: None, 17 insert_text: None,
18 insert_text_format: PlainText, 18 insert_text_format: PlainText,
19 source_range: [108; 146), 19 source_range: [129; 129),
20 text_edit: None 20 text_edit: None
21 }, 21 },
22 CompletionItem { 22 CompletionItem {
@@ -34,7 +34,7 @@ source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs"
34 "foo()$0" 34 "foo()$0"
35 ), 35 ),
36 insert_text_format: Snippet, 36 insert_text_format: Snippet,
37 source_range: [108; 146), 37 source_range: [129; 129),
38 text_edit: None 38 text_edit: None
39 } 39 }
40] 40]
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__filter_postfix_completion3.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__filter_postfix_completion3.snap
index e8191596d..e0f4730e7 100644
--- a/crates/ra_ide_api/src/completion/snapshots/completion_item__filter_postfix_completion3.snap
+++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__filter_postfix_completion3.snap
@@ -1,8 +1,8 @@
1--- 1---
2created: "2019-01-22T14:45:00.830614900+00:00" 2created: "2019-01-23T05:27:32.222118+00:00"
3creator: [email protected] 3creator: [email protected]
4expression: kind_completions 4expression: kind_completions
5source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs" 5source: crates/ra_ide_api/src/completion/completion_item.rs
6--- 6---
7[ 7[
8 CompletionItem { 8 CompletionItem {
@@ -16,12 +16,12 @@ source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs"
16 "!bar" 16 "!bar"
17 ), 17 ),
18 insert_text_format: Snippet, 18 insert_text_format: Snippet,
19 source_range: [76; 78), 19 source_range: [78; 78),
20 text_edit: Some( 20 text_edit: Some(
21 TextEdit { 21 TextEdit {
22 atoms: [ 22 atoms: [
23 AtomTextEdit { 23 AtomTextEdit {
24 delete: [72; 76), 24 delete: [72; 78),
25 insert: "" 25 insert: ""
26 } 26 }
27 ] 27 ]
@@ -39,12 +39,12 @@ source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs"
39 "if bar {$0}" 39 "if bar {$0}"
40 ), 40 ),
41 insert_text_format: Snippet, 41 insert_text_format: Snippet,
42 source_range: [76; 78), 42 source_range: [78; 78),
43 text_edit: Some( 43 text_edit: Some(
44 TextEdit { 44 TextEdit {
45 atoms: [ 45 atoms: [
46 AtomTextEdit { 46 AtomTextEdit {
47 delete: [72; 76), 47 delete: [72; 78),
48 insert: "" 48 insert: ""
49 } 49 }
50 ] 50 ]
@@ -62,12 +62,12 @@ source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs"
62 "match bar {\n${1:_} => {$0\\},\n}" 62 "match bar {\n${1:_} => {$0\\},\n}"
63 ), 63 ),
64 insert_text_format: Snippet, 64 insert_text_format: Snippet,
65 source_range: [76; 78), 65 source_range: [78; 78),
66 text_edit: Some( 66 text_edit: Some(
67 TextEdit { 67 TextEdit {
68 atoms: [ 68 atoms: [
69 AtomTextEdit { 69 AtomTextEdit {
70 delete: [72; 76), 70 delete: [72; 78),
71 insert: "" 71 insert: ""
72 } 72 }
73 ] 73 ]
@@ -85,12 +85,12 @@ source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs"
85 "while bar {\n$0\n}" 85 "while bar {\n$0\n}"
86 ), 86 ),
87 insert_text_format: Snippet, 87 insert_text_format: Snippet,
88 source_range: [76; 78), 88 source_range: [78; 78),
89 text_edit: Some( 89 text_edit: Some(
90 TextEdit { 90 TextEdit {
91 atoms: [ 91 atoms: [
92 AtomTextEdit { 92 AtomTextEdit {
93 delete: [72; 76), 93 delete: [72; 78),
94 insert: "" 94 insert: ""
95 } 95 }
96 ] 96 ]
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 f1de82bcc..2b6182578 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,8 +1,8 @@
1--- 1---
2created: "2019-01-22T14:45:00.635137200+00:00" 2created: "2019-01-23T05:27:32.197298+00:00"
3creator: [email protected] 3creator: [email protected]
4expression: kind_completions 4expression: kind_completions
5source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs" 5source: crates/ra_ide_api/src/completion/completion_item.rs
6--- 6---
7[ 7[
8 CompletionItem { 8 CompletionItem {
@@ -18,7 +18,7 @@ source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs"
18 "if $0 {}" 18 "if $0 {}"
19 ), 19 ),
20 insert_text_format: Snippet, 20 insert_text_format: Snippet,
21 source_range: [24; 54), 21 source_range: [41; 41),
22 text_edit: None 22 text_edit: None
23 }, 23 },
24 CompletionItem { 24 CompletionItem {
@@ -34,7 +34,7 @@ source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs"
34 "match $0 {}" 34 "match $0 {}"
35 ), 35 ),
36 insert_text_format: Snippet, 36 insert_text_format: Snippet,
37 source_range: [24; 54), 37 source_range: [41; 41),
38 text_edit: None 38 text_edit: None
39 }, 39 },
40 CompletionItem { 40 CompletionItem {
@@ -50,7 +50,7 @@ source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs"
50 "while $0 {}" 50 "while $0 {}"
51 ), 51 ),
52 insert_text_format: Snippet, 52 insert_text_format: Snippet,
53 source_range: [24; 54), 53 source_range: [41; 41),
54 text_edit: None 54 text_edit: None
55 }, 55 },
56 CompletionItem { 56 CompletionItem {
@@ -66,7 +66,7 @@ source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs"
66 "loop {$0}" 66 "loop {$0}"
67 ), 67 ),
68 insert_text_format: Snippet, 68 insert_text_format: Snippet,
69 source_range: [24; 54), 69 source_range: [41; 41),
70 text_edit: None 70 text_edit: None
71 }, 71 },
72 CompletionItem { 72 CompletionItem {
@@ -82,7 +82,7 @@ source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs"
82 "return;" 82 "return;"
83 ), 83 ),
84 insert_text_format: Snippet, 84 insert_text_format: Snippet,
85 source_range: [24; 54), 85 source_range: [41; 41),
86 text_edit: None 86 text_edit: None
87 } 87 }
88] 88]
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 c309ff9bc..a56105f0c 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,8 +1,8 @@
1--- 1---
2created: "2019-01-22T14:45:00.626162800+00:00" 2created: "2019-01-23T05:27:32.197423+00:00"
3creator: [email protected] 3creator: [email protected]
4expression: kind_completions 4expression: kind_completions
5source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs" 5source: crates/ra_ide_api/src/completion/completion_item.rs
6--- 6---
7[ 7[
8 CompletionItem { 8 CompletionItem {
@@ -18,7 +18,7 @@ source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs"
18 "if $0 {}" 18 "if $0 {}"
19 ), 19 ),
20 insert_text_format: Snippet, 20 insert_text_format: Snippet,
21 source_range: [91; 105), 21 source_range: [92; 92),
22 text_edit: None 22 text_edit: None
23 }, 23 },
24 CompletionItem { 24 CompletionItem {
@@ -34,7 +34,7 @@ source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs"
34 "match $0 {}" 34 "match $0 {}"
35 ), 35 ),
36 insert_text_format: Snippet, 36 insert_text_format: Snippet,
37 source_range: [91; 105), 37 source_range: [92; 92),
38 text_edit: None 38 text_edit: None
39 }, 39 },
40 CompletionItem { 40 CompletionItem {
@@ -50,7 +50,7 @@ source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs"
50 "while $0 {}" 50 "while $0 {}"
51 ), 51 ),
52 insert_text_format: Snippet, 52 insert_text_format: Snippet,
53 source_range: [91; 105), 53 source_range: [92; 92),
54 text_edit: None 54 text_edit: None
55 }, 55 },
56 CompletionItem { 56 CompletionItem {
@@ -66,7 +66,7 @@ source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs"
66 "loop {$0}" 66 "loop {$0}"
67 ), 67 ),
68 insert_text_format: Snippet, 68 insert_text_format: Snippet,
69 source_range: [91; 105), 69 source_range: [92; 92),
70 text_edit: None 70 text_edit: None
71 }, 71 },
72 CompletionItem { 72 CompletionItem {
@@ -82,7 +82,7 @@ source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs"
82 "else {$0}" 82 "else {$0}"
83 ), 83 ),
84 insert_text_format: Snippet, 84 insert_text_format: Snippet,
85 source_range: [91; 105), 85 source_range: [92; 92),
86 text_edit: None 86 text_edit: None
87 }, 87 },
88 CompletionItem { 88 CompletionItem {
@@ -98,7 +98,7 @@ source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs"
98 "else if $0 {}" 98 "else if $0 {}"
99 ), 99 ),
100 insert_text_format: Snippet, 100 insert_text_format: Snippet,
101 source_range: [91; 105), 101 source_range: [92; 92),
102 text_edit: None 102 text_edit: None
103 }, 103 },
104 CompletionItem { 104 CompletionItem {
@@ -114,7 +114,7 @@ source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs"
114 "return;" 114 "return;"
115 ), 115 ),
116 insert_text_format: Snippet, 116 insert_text_format: Snippet,
117 source_range: [91; 105), 117 source_range: [92; 92),
118 text_edit: None 118 text_edit: None
119 } 119 }
120] 120]
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 950cc8045..84efab6f6 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,8 +1,8 @@
1--- 1---
2created: "2019-01-22T14:45:00.701959300+00:00" 2created: "2019-01-23T05:27:32.200056+00:00"
3creator: [email protected] 3creator: [email protected]
4expression: kind_completions 4expression: kind_completions
5source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs" 5source: crates/ra_ide_api/src/completion/completion_item.rs
6--- 6---
7[ 7[
8 CompletionItem { 8 CompletionItem {
@@ -18,7 +18,7 @@ source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs"
18 "if $0 {}" 18 "if $0 {}"
19 ), 19 ),
20 insert_text_format: Snippet, 20 insert_text_format: Snippet,
21 source_range: [31; 65), 21 source_range: [48; 48),
22 text_edit: None 22 text_edit: None
23 }, 23 },
24 CompletionItem { 24 CompletionItem {
@@ -34,7 +34,7 @@ source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs"
34 "match $0 {}" 34 "match $0 {}"
35 ), 35 ),
36 insert_text_format: Snippet, 36 insert_text_format: Snippet,
37 source_range: [31; 65), 37 source_range: [48; 48),
38 text_edit: None 38 text_edit: None
39 }, 39 },
40 CompletionItem { 40 CompletionItem {
@@ -50,7 +50,7 @@ source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs"
50 "while $0 {}" 50 "while $0 {}"
51 ), 51 ),
52 insert_text_format: Snippet, 52 insert_text_format: Snippet,
53 source_range: [31; 65), 53 source_range: [48; 48),
54 text_edit: None 54 text_edit: None
55 }, 55 },
56 CompletionItem { 56 CompletionItem {
@@ -66,7 +66,7 @@ source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs"
66 "loop {$0}" 66 "loop {$0}"
67 ), 67 ),
68 insert_text_format: Snippet, 68 insert_text_format: Snippet,
69 source_range: [31; 65), 69 source_range: [48; 48),
70 text_edit: None 70 text_edit: None
71 }, 71 },
72 CompletionItem { 72 CompletionItem {
@@ -82,7 +82,7 @@ source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs"
82 "return $0;" 82 "return $0;"
83 ), 83 ),
84 insert_text_format: Snippet, 84 insert_text_format: Snippet,
85 source_range: [31; 65), 85 source_range: [48; 48),
86 text_edit: None 86 text_edit: None
87 } 87 }
88] 88]
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 ae14d7e39..8b254ce99 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,8 +1,8 @@
1--- 1---
2created: "2019-01-22T14:45:00.788727100+00:00" 2created: "2019-01-23T05:27:32.314468+00:00"
3creator: [email protected] 3creator: [email protected]
4expression: kind_completions 4expression: kind_completions
5source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs" 5source: crates/ra_ide_api/src/completion/completion_item.rs
6--- 6---
7[ 7[
8 CompletionItem { 8 CompletionItem {
@@ -18,7 +18,7 @@ source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs"
18 "if $0 {}" 18 "if $0 {}"
19 ), 19 ),
20 insert_text_format: Snippet, 20 insert_text_format: Snippet,
21 source_range: [24; 58), 21 source_range: [41; 41),
22 text_edit: None 22 text_edit: None
23 }, 23 },
24 CompletionItem { 24 CompletionItem {
@@ -34,7 +34,7 @@ source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs"
34 "match $0 {}" 34 "match $0 {}"
35 ), 35 ),
36 insert_text_format: Snippet, 36 insert_text_format: Snippet,
37 source_range: [24; 58), 37 source_range: [41; 41),
38 text_edit: None 38 text_edit: None
39 }, 39 },
40 CompletionItem { 40 CompletionItem {
@@ -50,7 +50,7 @@ source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs"
50 "while $0 {}" 50 "while $0 {}"
51 ), 51 ),
52 insert_text_format: Snippet, 52 insert_text_format: Snippet,
53 source_range: [24; 58), 53 source_range: [41; 41),
54 text_edit: None 54 text_edit: None
55 }, 55 },
56 CompletionItem { 56 CompletionItem {
@@ -66,7 +66,7 @@ source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs"
66 "loop {$0}" 66 "loop {$0}"
67 ), 67 ),
68 insert_text_format: Snippet, 68 insert_text_format: Snippet,
69 source_range: [24; 58), 69 source_range: [41; 41),
70 text_edit: None 70 text_edit: None
71 }, 71 },
72 CompletionItem { 72 CompletionItem {
@@ -82,7 +82,7 @@ source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs"
82 "return;" 82 "return;"
83 ), 83 ),
84 insert_text_format: Snippet, 84 insert_text_format: Snippet,
85 source_range: [24; 58), 85 source_range: [41; 41),
86 text_edit: None 86 text_edit: None
87 } 87 }
88] 88]
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 2ec855bf6..9dd5b2254 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,8 +1,8 @@
1--- 1---
2created: "2019-01-22T14:45:00.626162800+00:00" 2created: "2019-01-23T05:27:32.196887+00:00"
3creator: [email protected] 3creator: [email protected]
4expression: kind_completions 4expression: kind_completions
5source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs" 5source: crates/ra_ide_api/src/completion/completion_item.rs
6--- 6---
7[ 7[
8 CompletionItem { 8 CompletionItem {
@@ -18,7 +18,7 @@ source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs"
18 "crate::" 18 "crate::"
19 ), 19 ),
20 insert_text_format: PlainText, 20 insert_text_format: PlainText,
21 source_range: [16; 30), 21 source_range: [17; 17),
22 text_edit: None 22 text_edit: None
23 }, 23 },
24 CompletionItem { 24 CompletionItem {
@@ -32,7 +32,7 @@ source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs"
32 lookup: None, 32 lookup: None,
33 insert_text: None, 33 insert_text: None,
34 insert_text_format: PlainText, 34 insert_text_format: PlainText,
35 source_range: [16; 30), 35 source_range: [17; 17),
36 text_edit: None 36 text_edit: None
37 }, 37 },
38 CompletionItem { 38 CompletionItem {
@@ -48,7 +48,7 @@ source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs"
48 "super::" 48 "super::"
49 ), 49 ),
50 insert_text_format: PlainText, 50 insert_text_format: PlainText,
51 source_range: [16; 30), 51 source_range: [17; 17),
52 text_edit: None 52 text_edit: None
53 } 53 }
54] 54]
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 952650ea3..965a0fbed 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,8 +1,8 @@
1--- 1---
2created: "2019-01-22T14:45:00.779752+00:00" 2created: "2019-01-23T05:27:32.303390+00:00"
3creator: [email protected] 3creator: [email protected]
4expression: kind_completions 4expression: kind_completions
5source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs" 5source: crates/ra_ide_api/src/completion/completion_item.rs
6--- 6---
7[ 7[
8 CompletionItem { 8 CompletionItem {
@@ -16,7 +16,7 @@ source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs"
16 lookup: None, 16 lookup: None,
17 insert_text: None, 17 insert_text: None,
18 insert_text_format: PlainText, 18 insert_text_format: PlainText,
19 source_range: [23; 24), 19 source_range: [24; 24),
20 text_edit: None 20 text_edit: None
21 }, 21 },
22 CompletionItem { 22 CompletionItem {
@@ -32,7 +32,7 @@ source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs"
32 "super::" 32 "super::"
33 ), 33 ),
34 insert_text_format: PlainText, 34 insert_text_format: PlainText,
35 source_range: [23; 24), 35 source_range: [24; 24),
36 text_edit: None 36 text_edit: None
37 } 37 }
38] 38]
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 1d8725d34..d36b555db 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,8 +1,8 @@
1--- 1---
2created: "2019-01-22T14:45:00.642118600+00:00" 2created: "2019-01-23T05:27:32.197624+00:00"
3creator: [email protected] 3creator: [email protected]
4expression: kind_completions 4expression: kind_completions
5source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs" 5source: crates/ra_ide_api/src/completion/completion_item.rs
6--- 6---
7[ 7[
8 CompletionItem { 8 CompletionItem {
@@ -18,7 +18,7 @@ source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs"
18 "if $0 {}" 18 "if $0 {}"
19 ), 19 ),
20 insert_text_format: Snippet, 20 insert_text_format: Snippet,
21 source_range: [62; 100), 21 source_range: [83; 83),
22 text_edit: None 22 text_edit: None
23 }, 23 },
24 CompletionItem { 24 CompletionItem {
@@ -34,7 +34,7 @@ source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs"
34 "match $0 {}" 34 "match $0 {}"
35 ), 35 ),
36 insert_text_format: Snippet, 36 insert_text_format: Snippet,
37 source_range: [62; 100), 37 source_range: [83; 83),
38 text_edit: None 38 text_edit: None
39 }, 39 },
40 CompletionItem { 40 CompletionItem {
@@ -50,7 +50,7 @@ source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs"
50 "while $0 {}" 50 "while $0 {}"
51 ), 51 ),
52 insert_text_format: Snippet, 52 insert_text_format: Snippet,
53 source_range: [62; 100), 53 source_range: [83; 83),
54 text_edit: None 54 text_edit: None
55 }, 55 },
56 CompletionItem { 56 CompletionItem {
@@ -66,7 +66,7 @@ source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs"
66 "loop {$0}" 66 "loop {$0}"
67 ), 67 ),
68 insert_text_format: Snippet, 68 insert_text_format: Snippet,
69 source_range: [62; 100), 69 source_range: [83; 83),
70 text_edit: None 70 text_edit: None
71 }, 71 },
72 CompletionItem { 72 CompletionItem {
@@ -82,7 +82,7 @@ source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs"
82 "return $0;" 82 "return $0;"
83 ), 83 ),
84 insert_text_format: Snippet, 84 insert_text_format: Snippet,
85 source_range: [62; 100), 85 source_range: [83; 83),
86 text_edit: None 86 text_edit: None
87 } 87 }
88] 88]
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 54175c1a3..d74483c0b 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,8 +1,8 @@
1--- 1---
2created: "2019-01-22T14:45:00.733874300+00:00" 2created: "2019-01-23T05:27:32.302452+00:00"
3creator: [email protected] 3creator: [email protected]
4expression: kind_completions 4expression: kind_completions
5source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs" 5source: crates/ra_ide_api/src/completion/completion_item.rs
6--- 6---
7[ 7[
8 CompletionItem { 8 CompletionItem {
@@ -18,7 +18,7 @@ source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs"
18 "if $0 {}" 18 "if $0 {}"
19 ), 19 ),
20 insert_text_format: Snippet, 20 insert_text_format: Snippet,
21 source_range: [62; 100), 21 source_range: [83; 83),
22 text_edit: None 22 text_edit: None
23 }, 23 },
24 CompletionItem { 24 CompletionItem {
@@ -34,7 +34,7 @@ source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs"
34 "match $0 {}" 34 "match $0 {}"
35 ), 35 ),
36 insert_text_format: Snippet, 36 insert_text_format: Snippet,
37 source_range: [62; 100), 37 source_range: [83; 83),
38 text_edit: None 38 text_edit: None
39 }, 39 },
40 CompletionItem { 40 CompletionItem {
@@ -50,7 +50,7 @@ source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs"
50 "while $0 {}" 50 "while $0 {}"
51 ), 51 ),
52 insert_text_format: Snippet, 52 insert_text_format: Snippet,
53 source_range: [62; 100), 53 source_range: [83; 83),
54 text_edit: None 54 text_edit: None
55 }, 55 },
56 CompletionItem { 56 CompletionItem {
@@ -66,7 +66,7 @@ source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs"
66 "loop {$0}" 66 "loop {$0}"
67 ), 67 ),
68 insert_text_format: Snippet, 68 insert_text_format: Snippet,
69 source_range: [62; 100), 69 source_range: [83; 83),
70 text_edit: None 70 text_edit: None
71 }, 71 },
72 CompletionItem { 72 CompletionItem {
@@ -82,7 +82,7 @@ source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs"
82 "return $0;" 82 "return $0;"
83 ), 83 ),
84 insert_text_format: Snippet, 84 insert_text_format: Snippet,
85 source_range: [62; 100), 85 source_range: [83; 83),
86 text_edit: None 86 text_edit: None
87 } 87 }
88] 88]
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 df9677ba3..a87880ab3 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,8 +1,8 @@
1--- 1---
2created: "2019-01-22T15:38:19.896999400+00:00" 2created: "2019-01-23T07:42:59.657718+00:00"
3creator: [email protected] 3creator: [email protected]
4expression: kind_completions 4expression: kind_completions
5source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs" 5source: crates/ra_ide_api/src/completion/completion_item.rs
6--- 6---
7[ 7[
8 CompletionItem { 8 CompletionItem {
@@ -20,7 +20,7 @@ source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs"
20 "quux()$0" 20 "quux()$0"
21 ), 21 ),
22 insert_text_format: Snippet, 22 insert_text_format: Snippet,
23 source_range: [72; 102), 23 source_range: [89; 89),
24 text_edit: None 24 text_edit: None
25 }, 25 },
26 CompletionItem { 26 CompletionItem {
@@ -34,7 +34,7 @@ source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs"
34 lookup: None, 34 lookup: None,
35 insert_text: None, 35 insert_text: None,
36 insert_text_format: PlainText, 36 insert_text_format: PlainText,
37 source_range: [72; 102), 37 source_range: [89; 89),
38 text_edit: None 38 text_edit: None
39 }, 39 },
40 CompletionItem { 40 CompletionItem {
@@ -48,7 +48,7 @@ source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs"
48 lookup: None, 48 lookup: None,
49 insert_text: None, 49 insert_text: None,
50 insert_text_format: PlainText, 50 insert_text_format: PlainText,
51 source_range: [72; 102), 51 source_range: [89; 89),
52 text_edit: None 52 text_edit: None
53 } 53 }
54] 54]
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 f4b38feb0..f95d10926 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,8 +1,8 @@
1--- 1---
2created: "2019-01-22T15:38:19.896002200+00:00" 2created: "2019-01-23T07:42:59.657837+00:00"
3creator: [email protected] 3creator: [email protected]
4expression: kind_completions 4expression: kind_completions
5source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs" 5source: crates/ra_ide_api/src/completion/completion_item.rs
6--- 6---
7[ 7[
8 CompletionItem { 8 CompletionItem {
@@ -20,7 +20,7 @@ source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs"
20 "quux()$0" 20 "quux()$0"
21 ), 21 ),
22 insert_text_format: Snippet, 22 insert_text_format: Snippet,
23 source_range: [100; 102), 23 source_range: [101; 101),
24 text_edit: None 24 text_edit: None
25 }, 25 },
26 CompletionItem { 26 CompletionItem {
@@ -34,7 +34,7 @@ source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs"
34 lookup: None, 34 lookup: None,
35 insert_text: None, 35 insert_text: None,
36 insert_text_format: PlainText, 36 insert_text_format: PlainText,
37 source_range: [100; 102), 37 source_range: [101; 101),
38 text_edit: None 38 text_edit: None
39 } 39 }
40] 40]
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 e6819f231..adc057d80 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,8 +1,8 @@
1--- 1---
2created: "2019-01-22T14:45:00.898433800+00:00" 2created: "2019-01-23T05:27:32.421411+00:00"
3creator: [email protected] 3creator: [email protected]
4expression: kind_completions 4expression: kind_completions
5source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs" 5source: crates/ra_ide_api/src/completion/completion_item.rs
6--- 6---
7[ 7[
8 CompletionItem { 8 CompletionItem {
@@ -16,7 +16,7 @@ source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs"
16 lookup: None, 16 lookup: None,
17 insert_text: None, 17 insert_text: None,
18 insert_text_format: PlainText, 18 insert_text_format: PlainText,
19 source_range: [46; 60), 19 source_range: [47; 47),
20 text_edit: None 20 text_edit: None
21 }, 21 },
22 CompletionItem { 22 CompletionItem {
@@ -34,7 +34,7 @@ source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs"
34 "x()$0" 34 "x()$0"
35 ), 35 ),
36 insert_text_format: Snippet, 36 insert_text_format: Snippet,
37 source_range: [46; 60), 37 source_range: [47; 47),
38 text_edit: None 38 text_edit: None
39 } 39 }
40] 40]
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 efda72adf..6a49e325c 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,8 +1,8 @@
1--- 1---
2created: "2019-01-22T14:45:00.894444600+00:00" 2created: "2019-01-23T05:27:32.422259+00:00"
3creator: [email protected] 3creator: [email protected]
4expression: kind_completions 4expression: kind_completions
5source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs" 5source: crates/ra_ide_api/src/completion/completion_item.rs
6--- 6---
7[ 7[
8 CompletionItem { 8 CompletionItem {
@@ -16,7 +16,7 @@ source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs"
16 lookup: None, 16 lookup: None,
17 insert_text: None, 17 insert_text: None,
18 insert_text_format: PlainText, 18 insert_text_format: PlainText,
19 source_range: [24; 26), 19 source_range: [25; 25),
20 text_edit: None 20 text_edit: None
21 } 21 }
22] 22]
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__should_not_complete_snippets_in_path.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__should_not_complete_snippets_in_path.snap
new file mode 100644
index 000000000..cb3278edf
--- /dev/null
+++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__should_not_complete_snippets_in_path.snap
@@ -0,0 +1,5 @@
1Created: 2019-01-23T05:19:36.475253+00:00
2Creator: [email protected]
3Source: crates/ra_ide_api/src/completion/completion_item.rs
4
5[]
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__should_not_complete_snippets_in_path2.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__should_not_complete_snippets_in_path2.snap
new file mode 100644
index 000000000..62c8e3de9
--- /dev/null
+++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__should_not_complete_snippets_in_path2.snap
@@ -0,0 +1,5 @@
1Created: 2019-01-23T05:19:36.476869+00:00
2Creator: [email protected]
3Source: crates/ra_ide_api/src/completion/completion_item.rs
4
5[]
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 1d9aff5bb..580c90bdd 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,8 +1,8 @@
1--- 1---
2created: "2019-01-22T14:45:00.944312600+00:00" 2created: "2019-01-23T05:27:32.430450+00:00"
3creator: [email protected] 3creator: [email protected]
4expression: kind_completions 4expression: kind_completions
5source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs" 5source: crates/ra_ide_api/src/completion/completion_item.rs
6--- 6---
7[ 7[
8 CompletionItem { 8 CompletionItem {
@@ -18,7 +18,7 @@ source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs"
18 "eprintln!(\"$0 = {:?}\", $0);" 18 "eprintln!(\"$0 = {:?}\", $0);"
19 ), 19 ),
20 insert_text_format: Snippet, 20 insert_text_format: Snippet,
21 source_range: [16; 18), 21 source_range: [17; 17),
22 text_edit: None 22 text_edit: None
23 }, 23 },
24 CompletionItem { 24 CompletionItem {
@@ -34,7 +34,7 @@ source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs"
34 "eprintln!(\"$0 = {:#?}\", $0);" 34 "eprintln!(\"$0 = {:#?}\", $0);"
35 ), 35 ),
36 insert_text_format: Snippet, 36 insert_text_format: Snippet,
37 source_range: [16; 18), 37 source_range: [17; 17),
38 text_edit: None 38 text_edit: None
39 } 39 }
40] 40]
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 678335404..ec95e454c 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,8 +1,8 @@
1--- 1---
2created: "2019-01-22T14:45:00.944312600+00:00" 2created: "2019-01-23T05:27:32.435110+00:00"
3creator: [email protected] 3creator: [email protected]
4expression: kind_completions 4expression: kind_completions
5source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs" 5source: crates/ra_ide_api/src/completion/completion_item.rs
6--- 6---
7[ 7[
8 CompletionItem { 8 CompletionItem {
@@ -20,7 +20,7 @@ source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs"
20 "#[test]\nfn ${1:feature}() {\n $0\n}" 20 "#[test]\nfn ${1:feature}() {\n $0\n}"
21 ), 21 ),
22 insert_text_format: Snippet, 22 insert_text_format: Snippet,
23 source_range: [49; 79), 23 source_range: [66; 66),
24 text_edit: None 24 text_edit: None
25 }, 25 },
26 CompletionItem { 26 CompletionItem {
@@ -36,7 +36,7 @@ source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs"
36 "pub(crate) $0" 36 "pub(crate) $0"
37 ), 37 ),
38 insert_text_format: Snippet, 38 insert_text_format: Snippet,
39 source_range: [49; 79), 39 source_range: [66; 66),
40 text_edit: None 40 text_edit: None
41 } 41 }
42] 42]