diff options
author | bors[bot] <bors[bot]@users.noreply.github.com> | 2019-01-27 21:54:34 +0000 |
---|---|---|
committer | bors[bot] <bors[bot]@users.noreply.github.com> | 2019-01-27 21:54:34 +0000 |
commit | 6e36d3f6537f80071e7ed8ff45ca2271a9ffe7a7 (patch) | |
tree | 49bb3da6d354604cd375acac105ee14ff5a38b23 /crates/ra_ide_api | |
parent | 19f77603c0aed92ec70a836dae4d447b8fcab922 (diff) | |
parent | cf5c99271d79e98332d6e7d35f885b7c79177238 (diff) |
Merge #694
694: Sort completions in tests r=matklad a=flodiebold
Co-authored-by: Florian Diebold <[email protected]>
Diffstat (limited to 'crates/ra_ide_api')
25 files changed, 271 insertions, 270 deletions
diff --git a/crates/ra_ide_api/src/completion/completion_item.rs b/crates/ra_ide_api/src/completion/completion_item.rs index b16ac2b28..49bd636a5 100644 --- a/crates/ra_ide_api/src/completion/completion_item.rs +++ b/crates/ra_ide_api/src/completion/completion_item.rs | |||
@@ -324,10 +324,11 @@ pub(crate) fn check_completion(test_name: &str, code: &str, kind: CompletionKind | |||
324 | }; | 324 | }; |
325 | let completions = completions(&analysis.db, position).unwrap(); | 325 | let completions = completions(&analysis.db, position).unwrap(); |
326 | let completion_items: Vec<CompletionItem> = completions.into(); | 326 | let completion_items: Vec<CompletionItem> = completions.into(); |
327 | let kind_completions: Vec<CompletionItem> = completion_items | 327 | let mut kind_completions: Vec<CompletionItem> = completion_items |
328 | .into_iter() | 328 | .into_iter() |
329 | .filter(|c| c.completion_kind == kind) | 329 | .filter(|c| c.completion_kind == kind) |
330 | .collect(); | 330 | .collect(); |
331 | kind_completions.sort_by_key(|c| c.label.clone()); | ||
331 | assert_debug_snapshot_matches!(test_name, kind_completions); | 332 | assert_debug_snapshot_matches!(test_name, kind_completions); |
332 | } | 333 | } |
333 | 334 | ||
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 329309c90..31df6565b 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,26 +1,12 @@ | |||
1 | --- | 1 | --- |
2 | created: "2019-01-23T07:42:59.656273+00:00" | 2 | created: "2019-01-27T19:56:59.944446814+00:00" |
3 | creator: insta@0.4.0 | 3 | creator: insta@0.5.2 |
4 | expression: kind_completions | 4 | expression: kind_completions |
5 | source: crates/ra_ide_api/src/completion/completion_item.rs | 5 | source: crates/ra_ide_api/src/completion/completion_item.rs |
6 | --- | 6 | --- |
7 | [ | 7 | [ |
8 | CompletionItem { | 8 | CompletionItem { |
9 | completion_kind: Reference, | 9 | completion_kind: Reference, |
10 | label: "x", | ||
11 | kind: Some( | ||
12 | Binding | ||
13 | ), | ||
14 | detail: None, | ||
15 | documentation: None, | ||
16 | lookup: None, | ||
17 | insert_text: None, | ||
18 | insert_text_format: PlainText, | ||
19 | source_range: [83; 83), | ||
20 | text_edit: None | ||
21 | }, | ||
22 | CompletionItem { | ||
23 | completion_kind: Reference, | ||
24 | label: "quux", | 10 | label: "quux", |
25 | kind: Some( | 11 | kind: Some( |
26 | Function | 12 | Function |
@@ -36,5 +22,19 @@ source: crates/ra_ide_api/src/completion/completion_item.rs | |||
36 | insert_text_format: Snippet, | 22 | insert_text_format: Snippet, |
37 | source_range: [83; 83), | 23 | source_range: [83; 83), |
38 | text_edit: None | 24 | text_edit: None |
25 | }, | ||
26 | CompletionItem { | ||
27 | completion_kind: Reference, | ||
28 | label: "x", | ||
29 | kind: Some( | ||
30 | Binding | ||
31 | ), | ||
32 | detail: None, | ||
33 | documentation: None, | ||
34 | lookup: None, | ||
35 | insert_text: None, | ||
36 | insert_text_format: PlainText, | ||
37 | source_range: [83; 83), | ||
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 dbbe06c7b..9f37bae36 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,13 +1,13 @@ | |||
1 | --- | 1 | --- |
2 | created: "2019-01-23T07:42:59.658419+00:00" | 2 | created: "2019-01-27T19:56:59.946956414+00:00" |
3 | creator: insta@0.4.0 | 3 | creator: insta@0.5.2 |
4 | expression: kind_completions | 4 | expression: kind_completions |
5 | source: crates/ra_ide_api/src/completion/completion_item.rs | 5 | source: crates/ra_ide_api/src/completion/completion_item.rs |
6 | --- | 6 | --- |
7 | [ | 7 | [ |
8 | CompletionItem { | 8 | CompletionItem { |
9 | completion_kind: Reference, | 9 | completion_kind: Reference, |
10 | label: "b", | 10 | label: "a", |
11 | kind: Some( | 11 | kind: Some( |
12 | Binding | 12 | Binding |
13 | ), | 13 | ), |
@@ -21,7 +21,7 @@ source: crates/ra_ide_api/src/completion/completion_item.rs | |||
21 | }, | 21 | }, |
22 | CompletionItem { | 22 | CompletionItem { |
23 | completion_kind: Reference, | 23 | completion_kind: Reference, |
24 | label: "a", | 24 | label: "b", |
25 | kind: Some( | 25 | kind: Some( |
26 | Binding | 26 | Binding |
27 | ), | 27 | ), |
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 b727bb70c..f4808bc93 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,21 +1,25 @@ | |||
1 | --- | 1 | --- |
2 | created: "2019-01-23T07:42:59.657713+00:00" | 2 | created: "2019-01-27T19:56:59.948953759+00:00" |
3 | creator: insta@0.4.0 | 3 | creator: insta@0.5.2 |
4 | expression: kind_completions | 4 | expression: kind_completions |
5 | source: crates/ra_ide_api/src/completion/completion_item.rs | 5 | source: crates/ra_ide_api/src/completion/completion_item.rs |
6 | --- | 6 | --- |
7 | [ | 7 | [ |
8 | CompletionItem { | 8 | CompletionItem { |
9 | completion_kind: Reference, | 9 | completion_kind: Reference, |
10 | label: "y", | 10 | label: "quux", |
11 | kind: Some( | 11 | kind: Some( |
12 | Binding | 12 | Function |
13 | ), | ||
14 | detail: Some( | ||
15 | "fn quux(x: i32)" | ||
13 | ), | 16 | ), |
14 | detail: None, | ||
15 | documentation: None, | 17 | documentation: None, |
16 | lookup: None, | 18 | lookup: None, |
17 | insert_text: None, | 19 | insert_text: Some( |
18 | insert_text_format: PlainText, | 20 | "quux($0)" |
21 | ), | ||
22 | insert_text_format: Snippet, | ||
19 | source_range: [79; 79), | 23 | source_range: [79; 79), |
20 | text_edit: None | 24 | text_edit: None |
21 | }, | 25 | }, |
@@ -35,19 +39,15 @@ source: crates/ra_ide_api/src/completion/completion_item.rs | |||
35 | }, | 39 | }, |
36 | CompletionItem { | 40 | CompletionItem { |
37 | completion_kind: Reference, | 41 | completion_kind: Reference, |
38 | label: "quux", | 42 | label: "y", |
39 | kind: Some( | 43 | kind: Some( |
40 | Function | 44 | Binding |
41 | ), | ||
42 | detail: Some( | ||
43 | "fn quux(x: i32)" | ||
44 | ), | 45 | ), |
46 | detail: None, | ||
45 | documentation: None, | 47 | documentation: None, |
46 | lookup: None, | 48 | lookup: None, |
47 | insert_text: Some( | 49 | insert_text: None, |
48 | "quux($0)" | 50 | insert_text_format: PlainText, |
49 | ), | ||
50 | insert_text_format: Snippet, | ||
51 | source_range: [79; 79), | 51 | source_range: [79; 79), |
52 | text_edit: None | 52 | text_edit: None |
53 | } | 53 | } |
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 8dcb773d0..25ccbdb8f 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,13 +1,13 @@ | |||
1 | --- | 1 | --- |
2 | created: "2019-01-23T05:27:32.197434+00:00" | 2 | created: "2019-01-27T19:56:59.913816522+00:00" |
3 | creator: insta@0.4.0 | 3 | creator: insta@0.5.2 |
4 | expression: kind_completions | 4 | expression: kind_completions |
5 | source: crates/ra_ide_api/src/completion/completion_item.rs | 5 | source: crates/ra_ide_api/src/completion/completion_item.rs |
6 | --- | 6 | --- |
7 | [ | 7 | [ |
8 | CompletionItem { | 8 | CompletionItem { |
9 | completion_kind: Keyword, | 9 | completion_kind: Keyword, |
10 | label: "if", | 10 | label: "break", |
11 | kind: Some( | 11 | kind: Some( |
12 | Keyword | 12 | Keyword |
13 | ), | 13 | ), |
@@ -15,7 +15,7 @@ source: crates/ra_ide_api/src/completion/completion_item.rs | |||
15 | documentation: None, | 15 | documentation: None, |
16 | lookup: None, | 16 | lookup: None, |
17 | insert_text: Some( | 17 | insert_text: Some( |
18 | "if $0 {}" | 18 | "break;" |
19 | ), | 19 | ), |
20 | insert_text_format: Snippet, | 20 | insert_text_format: Snippet, |
21 | source_range: [55; 55), | 21 | source_range: [55; 55), |
@@ -23,7 +23,7 @@ source: crates/ra_ide_api/src/completion/completion_item.rs | |||
23 | }, | 23 | }, |
24 | CompletionItem { | 24 | CompletionItem { |
25 | completion_kind: Keyword, | 25 | completion_kind: Keyword, |
26 | label: "match", | 26 | label: "continue", |
27 | kind: Some( | 27 | kind: Some( |
28 | Keyword | 28 | Keyword |
29 | ), | 29 | ), |
@@ -31,7 +31,7 @@ source: crates/ra_ide_api/src/completion/completion_item.rs | |||
31 | documentation: None, | 31 | documentation: None, |
32 | lookup: None, | 32 | lookup: None, |
33 | insert_text: Some( | 33 | insert_text: Some( |
34 | "match $0 {}" | 34 | "continue;" |
35 | ), | 35 | ), |
36 | insert_text_format: Snippet, | 36 | insert_text_format: Snippet, |
37 | source_range: [55; 55), | 37 | source_range: [55; 55), |
@@ -39,7 +39,7 @@ source: crates/ra_ide_api/src/completion/completion_item.rs | |||
39 | }, | 39 | }, |
40 | CompletionItem { | 40 | CompletionItem { |
41 | completion_kind: Keyword, | 41 | completion_kind: Keyword, |
42 | label: "while", | 42 | label: "if", |
43 | kind: Some( | 43 | kind: Some( |
44 | Keyword | 44 | Keyword |
45 | ), | 45 | ), |
@@ -47,7 +47,7 @@ source: crates/ra_ide_api/src/completion/completion_item.rs | |||
47 | documentation: None, | 47 | documentation: None, |
48 | lookup: None, | 48 | lookup: None, |
49 | insert_text: Some( | 49 | insert_text: Some( |
50 | "while $0 {}" | 50 | "if $0 {}" |
51 | ), | 51 | ), |
52 | insert_text_format: Snippet, | 52 | insert_text_format: Snippet, |
53 | source_range: [55; 55), | 53 | source_range: [55; 55), |
@@ -71,7 +71,7 @@ source: crates/ra_ide_api/src/completion/completion_item.rs | |||
71 | }, | 71 | }, |
72 | CompletionItem { | 72 | CompletionItem { |
73 | completion_kind: Keyword, | 73 | completion_kind: Keyword, |
74 | label: "continue", | 74 | label: "match", |
75 | kind: Some( | 75 | kind: Some( |
76 | Keyword | 76 | Keyword |
77 | ), | 77 | ), |
@@ -79,7 +79,7 @@ source: crates/ra_ide_api/src/completion/completion_item.rs | |||
79 | documentation: None, | 79 | documentation: None, |
80 | lookup: None, | 80 | lookup: None, |
81 | insert_text: Some( | 81 | insert_text: Some( |
82 | "continue;" | 82 | "match $0 {}" |
83 | ), | 83 | ), |
84 | insert_text_format: Snippet, | 84 | insert_text_format: Snippet, |
85 | source_range: [55; 55), | 85 | source_range: [55; 55), |
@@ -87,7 +87,7 @@ source: crates/ra_ide_api/src/completion/completion_item.rs | |||
87 | }, | 87 | }, |
88 | CompletionItem { | 88 | CompletionItem { |
89 | completion_kind: Keyword, | 89 | completion_kind: Keyword, |
90 | label: "break", | 90 | label: "return", |
91 | kind: Some( | 91 | kind: Some( |
92 | Keyword | 92 | Keyword |
93 | ), | 93 | ), |
@@ -95,7 +95,7 @@ source: crates/ra_ide_api/src/completion/completion_item.rs | |||
95 | documentation: None, | 95 | documentation: None, |
96 | lookup: None, | 96 | lookup: None, |
97 | insert_text: Some( | 97 | insert_text: Some( |
98 | "break;" | 98 | "return $0;" |
99 | ), | 99 | ), |
100 | insert_text_format: Snippet, | 100 | insert_text_format: Snippet, |
101 | source_range: [55; 55), | 101 | source_range: [55; 55), |
@@ -103,7 +103,7 @@ source: crates/ra_ide_api/src/completion/completion_item.rs | |||
103 | }, | 103 | }, |
104 | CompletionItem { | 104 | CompletionItem { |
105 | completion_kind: Keyword, | 105 | completion_kind: Keyword, |
106 | label: "return", | 106 | label: "while", |
107 | kind: Some( | 107 | kind: Some( |
108 | Keyword | 108 | Keyword |
109 | ), | 109 | ), |
@@ -111,7 +111,7 @@ source: crates/ra_ide_api/src/completion/completion_item.rs | |||
111 | documentation: None, | 111 | documentation: None, |
112 | lookup: None, | 112 | lookup: None, |
113 | insert_text: Some( | 113 | insert_text: Some( |
114 | "return $0;" | 114 | "while $0 {}" |
115 | ), | 115 | ), |
116 | insert_text_format: Snippet, | 116 | insert_text_format: Snippet, |
117 | source_range: [55; 55), | 117 | source_range: [55; 55), |
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 1c64c6548..42a888e3a 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,6 +1,6 @@ | |||
1 | --- | 1 | --- |
2 | created: "2019-01-23T05:27:32.314513+00:00" | 2 | created: "2019-01-27T20:00:15.602646258+00:00" |
3 | creator: insta@0.4.0 | 3 | creator: insta@0.5.2 |
4 | expression: kind_completions | 4 | expression: kind_completions |
5 | source: crates/ra_ide_api/src/completion/completion_item.rs | 5 | source: crates/ra_ide_api/src/completion/completion_item.rs |
6 | --- | 6 | --- |
@@ -23,7 +23,7 @@ source: crates/ra_ide_api/src/completion/completion_item.rs | |||
23 | }, | 23 | }, |
24 | CompletionItem { | 24 | CompletionItem { |
25 | completion_kind: Keyword, | 25 | completion_kind: Keyword, |
26 | label: "match", | 26 | label: "loop", |
27 | kind: Some( | 27 | kind: Some( |
28 | Keyword | 28 | Keyword |
29 | ), | 29 | ), |
@@ -31,7 +31,7 @@ source: crates/ra_ide_api/src/completion/completion_item.rs | |||
31 | documentation: None, | 31 | documentation: None, |
32 | lookup: None, | 32 | lookup: None, |
33 | insert_text: Some( | 33 | insert_text: Some( |
34 | "match $0 {}" | 34 | "loop {$0}" |
35 | ), | 35 | ), |
36 | insert_text_format: Snippet, | 36 | insert_text_format: Snippet, |
37 | source_range: [60; 60), | 37 | source_range: [60; 60), |
@@ -39,7 +39,7 @@ source: crates/ra_ide_api/src/completion/completion_item.rs | |||
39 | }, | 39 | }, |
40 | CompletionItem { | 40 | CompletionItem { |
41 | completion_kind: Keyword, | 41 | completion_kind: Keyword, |
42 | label: "while", | 42 | label: "match", |
43 | kind: Some( | 43 | kind: Some( |
44 | Keyword | 44 | Keyword |
45 | ), | 45 | ), |
@@ -47,7 +47,7 @@ source: crates/ra_ide_api/src/completion/completion_item.rs | |||
47 | documentation: None, | 47 | documentation: None, |
48 | lookup: None, | 48 | lookup: None, |
49 | insert_text: Some( | 49 | insert_text: Some( |
50 | "while $0 {}" | 50 | "match $0 {}" |
51 | ), | 51 | ), |
52 | insert_text_format: Snippet, | 52 | insert_text_format: Snippet, |
53 | source_range: [60; 60), | 53 | source_range: [60; 60), |
@@ -55,7 +55,7 @@ source: crates/ra_ide_api/src/completion/completion_item.rs | |||
55 | }, | 55 | }, |
56 | CompletionItem { | 56 | CompletionItem { |
57 | completion_kind: Keyword, | 57 | completion_kind: Keyword, |
58 | label: "loop", | 58 | label: "return", |
59 | kind: Some( | 59 | kind: Some( |
60 | Keyword | 60 | Keyword |
61 | ), | 61 | ), |
@@ -63,7 +63,7 @@ source: crates/ra_ide_api/src/completion/completion_item.rs | |||
63 | documentation: None, | 63 | documentation: None, |
64 | lookup: None, | 64 | lookup: None, |
65 | insert_text: Some( | 65 | insert_text: Some( |
66 | "loop {$0}" | 66 | "return $0;" |
67 | ), | 67 | ), |
68 | insert_text_format: Snippet, | 68 | insert_text_format: Snippet, |
69 | source_range: [60; 60), | 69 | source_range: [60; 60), |
@@ -71,7 +71,7 @@ source: crates/ra_ide_api/src/completion/completion_item.rs | |||
71 | }, | 71 | }, |
72 | CompletionItem { | 72 | CompletionItem { |
73 | completion_kind: Keyword, | 73 | completion_kind: Keyword, |
74 | label: "return", | 74 | label: "while", |
75 | kind: Some( | 75 | kind: Some( |
76 | Keyword | 76 | Keyword |
77 | ), | 77 | ), |
@@ -79,7 +79,7 @@ source: crates/ra_ide_api/src/completion/completion_item.rs | |||
79 | documentation: None, | 79 | documentation: None, |
80 | lookup: None, | 80 | lookup: None, |
81 | insert_text: Some( | 81 | insert_text: Some( |
82 | "return $0;" | 82 | "while $0 {}" |
83 | ), | 83 | ), |
84 | insert_text_format: Snippet, | 84 | insert_text_format: Snippet, |
85 | source_range: [60; 60), | 85 | source_range: [60; 60), |
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 8c9657b5c..5e4ff6af8 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,6 +1,6 @@ | |||
1 | --- | 1 | --- |
2 | created: "2019-01-23T05:27:32.197678+00:00" | 2 | created: "2019-01-27T19:56:59.920190685+00:00" |
3 | creator: insta@0.4.0 | 3 | creator: insta@0.5.2 |
4 | expression: kind_completions | 4 | expression: kind_completions |
5 | source: crates/ra_ide_api/src/completion/completion_item.rs | 5 | source: crates/ra_ide_api/src/completion/completion_item.rs |
6 | --- | 6 | --- |
@@ -23,7 +23,7 @@ source: crates/ra_ide_api/src/completion/completion_item.rs | |||
23 | }, | 23 | }, |
24 | CompletionItem { | 24 | CompletionItem { |
25 | completion_kind: Keyword, | 25 | completion_kind: Keyword, |
26 | label: "match", | 26 | label: "loop", |
27 | kind: Some( | 27 | kind: Some( |
28 | Keyword | 28 | Keyword |
29 | ), | 29 | ), |
@@ -31,7 +31,7 @@ source: crates/ra_ide_api/src/completion/completion_item.rs | |||
31 | documentation: None, | 31 | documentation: None, |
32 | lookup: None, | 32 | lookup: None, |
33 | insert_text: Some( | 33 | insert_text: Some( |
34 | "match $0 {}" | 34 | "loop {$0}" |
35 | ), | 35 | ), |
36 | insert_text_format: Snippet, | 36 | insert_text_format: Snippet, |
37 | source_range: [85; 85), | 37 | source_range: [85; 85), |
@@ -39,7 +39,7 @@ source: crates/ra_ide_api/src/completion/completion_item.rs | |||
39 | }, | 39 | }, |
40 | CompletionItem { | 40 | CompletionItem { |
41 | completion_kind: Keyword, | 41 | completion_kind: Keyword, |
42 | label: "while", | 42 | label: "match", |
43 | kind: Some( | 43 | kind: Some( |
44 | Keyword | 44 | Keyword |
45 | ), | 45 | ), |
@@ -47,7 +47,7 @@ source: crates/ra_ide_api/src/completion/completion_item.rs | |||
47 | documentation: None, | 47 | documentation: None, |
48 | lookup: None, | 48 | lookup: None, |
49 | insert_text: Some( | 49 | insert_text: Some( |
50 | "while $0 {}" | 50 | "match $0 {}" |
51 | ), | 51 | ), |
52 | insert_text_format: Snippet, | 52 | insert_text_format: Snippet, |
53 | source_range: [85; 85), | 53 | source_range: [85; 85), |
@@ -55,7 +55,7 @@ source: crates/ra_ide_api/src/completion/completion_item.rs | |||
55 | }, | 55 | }, |
56 | CompletionItem { | 56 | CompletionItem { |
57 | completion_kind: Keyword, | 57 | completion_kind: Keyword, |
58 | label: "loop", | 58 | label: "return", |
59 | kind: Some( | 59 | kind: Some( |
60 | Keyword | 60 | Keyword |
61 | ), | 61 | ), |
@@ -63,7 +63,7 @@ source: crates/ra_ide_api/src/completion/completion_item.rs | |||
63 | documentation: None, | 63 | documentation: None, |
64 | lookup: None, | 64 | lookup: None, |
65 | insert_text: Some( | 65 | insert_text: Some( |
66 | "loop {$0}" | 66 | "return $0" |
67 | ), | 67 | ), |
68 | insert_text_format: Snippet, | 68 | insert_text_format: Snippet, |
69 | source_range: [85; 85), | 69 | source_range: [85; 85), |
@@ -71,7 +71,7 @@ source: crates/ra_ide_api/src/completion/completion_item.rs | |||
71 | }, | 71 | }, |
72 | CompletionItem { | 72 | CompletionItem { |
73 | completion_kind: Keyword, | 73 | completion_kind: Keyword, |
74 | label: "return", | 74 | label: "while", |
75 | kind: Some( | 75 | kind: Some( |
76 | Keyword | 76 | Keyword |
77 | ), | 77 | ), |
@@ -79,7 +79,7 @@ source: crates/ra_ide_api/src/completion/completion_item.rs | |||
79 | documentation: None, | 79 | documentation: None, |
80 | lookup: None, | 80 | lookup: None, |
81 | insert_text: Some( | 81 | insert_text: Some( |
82 | "return $0" | 82 | "while $0 {}" |
83 | ), | 83 | ), |
84 | insert_text_format: Snippet, | 84 | insert_text_format: Snippet, |
85 | source_range: [85; 85), | 85 | source_range: [85; 85), |
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 091bf581e..f4a04ecb3 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,18 +1,18 @@ | |||
1 | --- | 1 | --- |
2 | created: "2019-01-22T15:38:19.788294+00:00" | 2 | created: "2019-01-27T19:56:59.965130040+00:00" |
3 | creator: insta@0.4.0 | 3 | creator: insta@0.5.2 |
4 | expression: kind_completions | 4 | expression: kind_completions |
5 | source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs" | 5 | source: crates/ra_ide_api/src/completion/completion_item.rs |
6 | --- | 6 | --- |
7 | [ | 7 | [ |
8 | CompletionItem { | 8 | CompletionItem { |
9 | completion_kind: Reference, | 9 | completion_kind: Reference, |
10 | label: "main", | 10 | label: "frobnicate", |
11 | kind: Some( | 11 | kind: Some( |
12 | Function | 12 | Function |
13 | ), | 13 | ), |
14 | detail: Some( | 14 | detail: Some( |
15 | "fn main()" | 15 | "fn frobnicate()" |
16 | ), | 16 | ), |
17 | documentation: None, | 17 | documentation: None, |
18 | lookup: None, | 18 | lookup: None, |
@@ -23,12 +23,12 @@ source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs" | |||
23 | }, | 23 | }, |
24 | CompletionItem { | 24 | CompletionItem { |
25 | completion_kind: Reference, | 25 | completion_kind: Reference, |
26 | label: "frobnicate", | 26 | label: "main", |
27 | kind: Some( | 27 | kind: Some( |
28 | Function | 28 | Function |
29 | ), | 29 | ), |
30 | detail: Some( | 30 | detail: Some( |
31 | "fn frobnicate()" | 31 | "fn main()" |
32 | ), | 32 | ), |
33 | documentation: None, | 33 | documentation: None, |
34 | lookup: None, | 34 | lookup: None, |
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 8c84439b2..8ac58006e 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 | --- |
2 | created: "2019-01-25T16:44:04.640545300+00:00" | 2 | created: "2019-01-27T19:56:59.937030324+00:00" |
3 | creator: [email protected] | 3 | creator: [email protected] |
4 | expression: kind_completions | 4 | expression: kind_completions |
5 | source: crates/ra_ide_api/src/completion/completion_item.rs | 5 | source: crates/ra_ide_api/src/completion/completion_item.rs |
@@ -7,16 +7,16 @@ source: crates/ra_ide_api/src/completion/completion_item.rs | |||
7 | [ | 7 | [ |
8 | CompletionItem { | 8 | CompletionItem { |
9 | completion_kind: Reference, | 9 | completion_kind: Reference, |
10 | label: "Foo", | 10 | label: "Bar", |
11 | kind: Some( | 11 | kind: Some( |
12 | EnumVariant | 12 | EnumVariant |
13 | ), | 13 | ), |
14 | detail: Some( | 14 | detail: Some( |
15 | "()" | 15 | "(i32)" |
16 | ), | 16 | ), |
17 | documentation: Some( | 17 | documentation: Some( |
18 | Documentation( | 18 | Documentation( |
19 | "Foo Variant" | 19 | "Bar Variant with i32" |
20 | ) | 20 | ) |
21 | ), | 21 | ), |
22 | lookup: None, | 22 | lookup: None, |
@@ -27,16 +27,16 @@ source: crates/ra_ide_api/src/completion/completion_item.rs | |||
27 | }, | 27 | }, |
28 | CompletionItem { | 28 | CompletionItem { |
29 | completion_kind: Reference, | 29 | completion_kind: Reference, |
30 | label: "Bar", | 30 | label: "Foo", |
31 | kind: Some( | 31 | kind: Some( |
32 | EnumVariant | 32 | EnumVariant |
33 | ), | 33 | ), |
34 | detail: Some( | 34 | detail: Some( |
35 | "(i32)" | 35 | "()" |
36 | ), | 36 | ), |
37 | documentation: Some( | 37 | documentation: Some( |
38 | Documentation( | 38 | Documentation( |
39 | "Bar Variant with i32" | 39 | "Foo Variant" |
40 | ) | 40 | ) |
41 | ), | 41 | ), |
42 | lookup: None, | 42 | lookup: None, |
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 384634517..9fd2d81ec 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 | --- |
2 | created: "2019-01-25T16:44:04.641542400+00:00" | 2 | created: "2019-01-27T19:56:59.938973454+00:00" |
3 | creator: [email protected] | 3 | creator: [email protected] |
4 | expression: kind_completions | 4 | expression: kind_completions |
5 | source: crates/ra_ide_api/src/completion/completion_item.rs | 5 | source: crates/ra_ide_api/src/completion/completion_item.rs |
@@ -7,16 +7,16 @@ source: crates/ra_ide_api/src/completion/completion_item.rs | |||
7 | [ | 7 | [ |
8 | CompletionItem { | 8 | CompletionItem { |
9 | completion_kind: Reference, | 9 | completion_kind: Reference, |
10 | label: "Foo", | 10 | label: "Bar", |
11 | kind: Some( | 11 | kind: Some( |
12 | EnumVariant | 12 | EnumVariant |
13 | ), | 13 | ), |
14 | detail: Some( | 14 | detail: Some( |
15 | "()" | 15 | "(i32, u32)" |
16 | ), | 16 | ), |
17 | documentation: Some( | 17 | documentation: Some( |
18 | Documentation( | 18 | Documentation( |
19 | "Foo Variant (empty)" | 19 | "Bar Variant with i32 and u32" |
20 | ) | 20 | ) |
21 | ), | 21 | ), |
22 | lookup: None, | 22 | lookup: None, |
@@ -27,16 +27,16 @@ source: crates/ra_ide_api/src/completion/completion_item.rs | |||
27 | }, | 27 | }, |
28 | CompletionItem { | 28 | CompletionItem { |
29 | completion_kind: Reference, | 29 | completion_kind: Reference, |
30 | label: "Bar", | 30 | label: "Foo", |
31 | kind: Some( | 31 | kind: Some( |
32 | EnumVariant | 32 | EnumVariant |
33 | ), | 33 | ), |
34 | detail: Some( | 34 | detail: Some( |
35 | "(i32, u32)" | 35 | "()" |
36 | ), | 36 | ), |
37 | documentation: Some( | 37 | documentation: Some( |
38 | Documentation( | 38 | Documentation( |
39 | "Bar Variant with i32 and u32" | 39 | "Foo Variant (empty)" |
40 | ) | 40 | ) |
41 | ), | 41 | ), |
42 | lookup: None, | 42 | lookup: None, |
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__filter_postfix_completion1.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__filter_postfix_completion1.snap index 13f915446..6b2287951 100644 --- a/crates/ra_ide_api/src/completion/snapshots/completion_item__filter_postfix_completion1.snap +++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__filter_postfix_completion1.snap | |||
@@ -1,19 +1,19 @@ | |||
1 | --- | 1 | --- |
2 | created: "2019-01-22T14:45:00.817649800+00:00" | 2 | created: "2019-01-27T19:56:59.944118550+00:00" |
3 | creator: insta@0.4.0 | 3 | creator: insta@0.5.2 |
4 | expression: kind_completions | 4 | expression: kind_completions |
5 | source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs" | 5 | source: crates/ra_ide_api/src/completion/completion_item.rs |
6 | --- | 6 | --- |
7 | [ | 7 | [ |
8 | CompletionItem { | 8 | CompletionItem { |
9 | completion_kind: Postfix, | 9 | completion_kind: Postfix, |
10 | label: "not", | 10 | label: "if", |
11 | kind: None, | 11 | kind: None, |
12 | detail: None, | 12 | detail: None, |
13 | documentation: None, | 13 | documentation: None, |
14 | lookup: None, | 14 | lookup: None, |
15 | insert_text: Some( | 15 | insert_text: Some( |
16 | "!bar" | 16 | "if bar {$0}" |
17 | ), | 17 | ), |
18 | insert_text_format: Snippet, | 18 | insert_text_format: Snippet, |
19 | source_range: [76; 76), | 19 | source_range: [76; 76), |
@@ -30,13 +30,13 @@ source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs" | |||
30 | }, | 30 | }, |
31 | CompletionItem { | 31 | CompletionItem { |
32 | completion_kind: Postfix, | 32 | completion_kind: Postfix, |
33 | label: "if", | 33 | label: "match", |
34 | kind: None, | 34 | kind: None, |
35 | detail: None, | 35 | detail: None, |
36 | documentation: None, | 36 | documentation: None, |
37 | lookup: None, | 37 | lookup: None, |
38 | insert_text: Some( | 38 | insert_text: Some( |
39 | "if bar {$0}" | 39 | "match bar {\n${1:_} => {$0\\},\n}" |
40 | ), | 40 | ), |
41 | insert_text_format: Snippet, | 41 | insert_text_format: Snippet, |
42 | source_range: [76; 76), | 42 | source_range: [76; 76), |
@@ -53,13 +53,13 @@ source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs" | |||
53 | }, | 53 | }, |
54 | CompletionItem { | 54 | CompletionItem { |
55 | completion_kind: Postfix, | 55 | completion_kind: Postfix, |
56 | label: "match", | 56 | label: "not", |
57 | kind: None, | 57 | kind: None, |
58 | detail: None, | 58 | detail: None, |
59 | documentation: None, | 59 | documentation: None, |
60 | lookup: None, | 60 | lookup: None, |
61 | insert_text: Some( | 61 | insert_text: Some( |
62 | "match bar {\n${1:_} => {$0\\},\n}" | 62 | "!bar" |
63 | ), | 63 | ), |
64 | insert_text_format: Snippet, | 64 | insert_text_format: Snippet, |
65 | source_range: [76; 76), | 65 | source_range: [76; 76), |
diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__filter_postfix_completion2.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__filter_postfix_completion2.snap index fff87574d..6925fd102 100644 --- a/crates/ra_ide_api/src/completion/snapshots/completion_item__filter_postfix_completion2.snap +++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__filter_postfix_completion2.snap | |||
@@ -1,19 +1,19 @@ | |||
1 | --- | 1 | --- |
2 | created: "2019-01-22T14:45:00.820642200+00:00" | 2 | created: "2019-01-27T19:56:59.942831213+00:00" |
3 | creator: insta@0.4.0 | 3 | creator: insta@0.5.2 |
4 | expression: kind_completions | 4 | expression: kind_completions |
5 | source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs" | 5 | source: crates/ra_ide_api/src/completion/completion_item.rs |
6 | --- | 6 | --- |
7 | [ | 7 | [ |
8 | CompletionItem { | 8 | CompletionItem { |
9 | completion_kind: Postfix, | 9 | completion_kind: Postfix, |
10 | label: "not", | 10 | label: "if", |
11 | kind: None, | 11 | kind: None, |
12 | detail: None, | 12 | detail: None, |
13 | documentation: None, | 13 | documentation: None, |
14 | lookup: None, | 14 | lookup: None, |
15 | insert_text: Some( | 15 | insert_text: Some( |
16 | "!bar" | 16 | "if bar {$0}" |
17 | ), | 17 | ), |
18 | insert_text_format: Snippet, | 18 | insert_text_format: Snippet, |
19 | source_range: [76; 77), | 19 | source_range: [76; 77), |
@@ -30,13 +30,13 @@ source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs" | |||
30 | }, | 30 | }, |
31 | CompletionItem { | 31 | CompletionItem { |
32 | completion_kind: Postfix, | 32 | completion_kind: Postfix, |
33 | label: "if", | 33 | label: "match", |
34 | kind: None, | 34 | kind: None, |
35 | detail: None, | 35 | detail: None, |
36 | documentation: None, | 36 | documentation: None, |
37 | lookup: None, | 37 | lookup: None, |
38 | insert_text: Some( | 38 | insert_text: Some( |
39 | "if bar {$0}" | 39 | "match bar {\n${1:_} => {$0\\},\n}" |
40 | ), | 40 | ), |
41 | insert_text_format: Snippet, | 41 | insert_text_format: Snippet, |
42 | source_range: [76; 77), | 42 | source_range: [76; 77), |
@@ -53,13 +53,13 @@ source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs" | |||
53 | }, | 53 | }, |
54 | CompletionItem { | 54 | CompletionItem { |
55 | completion_kind: Postfix, | 55 | completion_kind: Postfix, |
56 | label: "match", | 56 | label: "not", |
57 | kind: None, | 57 | kind: None, |
58 | detail: None, | 58 | detail: None, |
59 | documentation: None, | 59 | documentation: None, |
60 | lookup: None, | 60 | lookup: None, |
61 | insert_text: Some( | 61 | insert_text: Some( |
62 | "match bar {\n${1:_} => {$0\\},\n}" | 62 | "!bar" |
63 | ), | 63 | ), |
64 | insert_text_format: Snippet, | 64 | insert_text_format: Snippet, |
65 | source_range: [76; 77), | 65 | source_range: [76; 77), |
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 e0f4730e7..22eaf2b4f 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,19 +1,19 @@ | |||
1 | --- | 1 | --- |
2 | created: "2019-01-23T05:27:32.222118+00:00" | 2 | created: "2019-01-27T19:56:59.944615925+00:00" |
3 | creator: insta@0.4.0 | 3 | creator: insta@0.5.2 |
4 | expression: kind_completions | 4 | expression: kind_completions |
5 | source: crates/ra_ide_api/src/completion/completion_item.rs | 5 | source: crates/ra_ide_api/src/completion/completion_item.rs |
6 | --- | 6 | --- |
7 | [ | 7 | [ |
8 | CompletionItem { | 8 | CompletionItem { |
9 | completion_kind: Postfix, | 9 | completion_kind: Postfix, |
10 | label: "not", | 10 | label: "if", |
11 | kind: None, | 11 | kind: None, |
12 | detail: None, | 12 | detail: None, |
13 | documentation: None, | 13 | documentation: None, |
14 | lookup: None, | 14 | lookup: None, |
15 | insert_text: Some( | 15 | insert_text: Some( |
16 | "!bar" | 16 | "if bar {$0}" |
17 | ), | 17 | ), |
18 | insert_text_format: Snippet, | 18 | insert_text_format: Snippet, |
19 | source_range: [78; 78), | 19 | source_range: [78; 78), |
@@ -30,13 +30,13 @@ source: crates/ra_ide_api/src/completion/completion_item.rs | |||
30 | }, | 30 | }, |
31 | CompletionItem { | 31 | CompletionItem { |
32 | completion_kind: Postfix, | 32 | completion_kind: Postfix, |
33 | label: "if", | 33 | label: "match", |
34 | kind: None, | 34 | kind: None, |
35 | detail: None, | 35 | detail: None, |
36 | documentation: None, | 36 | documentation: None, |
37 | lookup: None, | 37 | lookup: None, |
38 | insert_text: Some( | 38 | insert_text: Some( |
39 | "if bar {$0}" | 39 | "match bar {\n${1:_} => {$0\\},\n}" |
40 | ), | 40 | ), |
41 | insert_text_format: Snippet, | 41 | insert_text_format: Snippet, |
42 | source_range: [78; 78), | 42 | source_range: [78; 78), |
@@ -53,13 +53,13 @@ source: crates/ra_ide_api/src/completion/completion_item.rs | |||
53 | }, | 53 | }, |
54 | CompletionItem { | 54 | CompletionItem { |
55 | completion_kind: Postfix, | 55 | completion_kind: Postfix, |
56 | label: "match", | 56 | label: "not", |
57 | kind: None, | 57 | kind: None, |
58 | detail: None, | 58 | detail: None, |
59 | documentation: None, | 59 | documentation: None, |
60 | lookup: None, | 60 | lookup: None, |
61 | insert_text: Some( | 61 | insert_text: Some( |
62 | "match bar {\n${1:_} => {$0\\},\n}" | 62 | "!bar" |
63 | ), | 63 | ), |
64 | insert_text_format: Snippet, | 64 | insert_text_format: Snippet, |
65 | source_range: [78; 78), | 65 | source_range: [78; 78), |
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 b30a4c9e9..339df3c84 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,23 +1,23 @@ | |||
1 | --- | 1 | --- |
2 | created: "2019-01-22T15:38:19.919937+00:00" | 2 | created: "2019-01-27T19:56:59.965550827+00:00" |
3 | creator: insta@0.4.0 | 3 | creator: insta@0.5.2 |
4 | expression: kind_completions | 4 | expression: kind_completions |
5 | source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs" | 5 | source: crates/ra_ide_api/src/completion/completion_item.rs |
6 | --- | 6 | --- |
7 | [ | 7 | [ |
8 | CompletionItem { | 8 | CompletionItem { |
9 | completion_kind: Reference, | 9 | completion_kind: Reference, |
10 | label: "no_args", | 10 | label: "main", |
11 | kind: Some( | 11 | kind: Some( |
12 | Function | 12 | Function |
13 | ), | 13 | ), |
14 | detail: Some( | 14 | detail: Some( |
15 | "fn no_args()" | 15 | "fn main()" |
16 | ), | 16 | ), |
17 | documentation: None, | 17 | documentation: None, |
18 | lookup: None, | 18 | lookup: None, |
19 | insert_text: Some( | 19 | insert_text: Some( |
20 | "no_args()$0" | 20 | "main()$0" |
21 | ), | 21 | ), |
22 | insert_text_format: Snippet, | 22 | insert_text_format: Snippet, |
23 | source_range: [53; 56), | 23 | source_range: [53; 56), |
@@ -25,17 +25,17 @@ source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs" | |||
25 | }, | 25 | }, |
26 | CompletionItem { | 26 | CompletionItem { |
27 | completion_kind: Reference, | 27 | completion_kind: Reference, |
28 | label: "main", | 28 | label: "no_args", |
29 | kind: Some( | 29 | kind: Some( |
30 | Function | 30 | Function |
31 | ), | 31 | ), |
32 | detail: Some( | 32 | detail: Some( |
33 | "fn main()" | 33 | "fn no_args()" |
34 | ), | 34 | ), |
35 | documentation: None, | 35 | documentation: None, |
36 | lookup: None, | 36 | lookup: None, |
37 | insert_text: Some( | 37 | insert_text: Some( |
38 | "main()$0" | 38 | "no_args()$0" |
39 | ), | 39 | ), |
40 | insert_text_format: Snippet, | 40 | insert_text_format: Snippet, |
41 | source_range: [53; 56), | 41 | source_range: [53; 56), |
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 2b6182578..874c41a02 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,6 +1,6 @@ | |||
1 | --- | 1 | --- |
2 | created: "2019-01-23T05:27:32.197298+00:00" | 2 | created: "2019-01-27T19:56:59.913826978+00:00" |
3 | creator: insta@0.4.0 | 3 | creator: insta@0.5.2 |
4 | expression: kind_completions | 4 | expression: kind_completions |
5 | source: crates/ra_ide_api/src/completion/completion_item.rs | 5 | source: crates/ra_ide_api/src/completion/completion_item.rs |
6 | --- | 6 | --- |
@@ -23,7 +23,7 @@ source: crates/ra_ide_api/src/completion/completion_item.rs | |||
23 | }, | 23 | }, |
24 | CompletionItem { | 24 | CompletionItem { |
25 | completion_kind: Keyword, | 25 | completion_kind: Keyword, |
26 | label: "match", | 26 | label: "loop", |
27 | kind: Some( | 27 | kind: Some( |
28 | Keyword | 28 | Keyword |
29 | ), | 29 | ), |
@@ -31,7 +31,7 @@ source: crates/ra_ide_api/src/completion/completion_item.rs | |||
31 | documentation: None, | 31 | documentation: None, |
32 | lookup: None, | 32 | lookup: None, |
33 | insert_text: Some( | 33 | insert_text: Some( |
34 | "match $0 {}" | 34 | "loop {$0}" |
35 | ), | 35 | ), |
36 | insert_text_format: Snippet, | 36 | insert_text_format: Snippet, |
37 | source_range: [41; 41), | 37 | source_range: [41; 41), |
@@ -39,7 +39,7 @@ source: crates/ra_ide_api/src/completion/completion_item.rs | |||
39 | }, | 39 | }, |
40 | CompletionItem { | 40 | CompletionItem { |
41 | completion_kind: Keyword, | 41 | completion_kind: Keyword, |
42 | label: "while", | 42 | label: "match", |
43 | kind: Some( | 43 | kind: Some( |
44 | Keyword | 44 | Keyword |
45 | ), | 45 | ), |
@@ -47,7 +47,7 @@ source: crates/ra_ide_api/src/completion/completion_item.rs | |||
47 | documentation: None, | 47 | documentation: None, |
48 | lookup: None, | 48 | lookup: None, |
49 | insert_text: Some( | 49 | insert_text: Some( |
50 | "while $0 {}" | 50 | "match $0 {}" |
51 | ), | 51 | ), |
52 | insert_text_format: Snippet, | 52 | insert_text_format: Snippet, |
53 | source_range: [41; 41), | 53 | source_range: [41; 41), |
@@ -55,7 +55,7 @@ source: crates/ra_ide_api/src/completion/completion_item.rs | |||
55 | }, | 55 | }, |
56 | CompletionItem { | 56 | CompletionItem { |
57 | completion_kind: Keyword, | 57 | completion_kind: Keyword, |
58 | label: "loop", | 58 | label: "return", |
59 | kind: Some( | 59 | kind: Some( |
60 | Keyword | 60 | Keyword |
61 | ), | 61 | ), |
@@ -63,7 +63,7 @@ source: crates/ra_ide_api/src/completion/completion_item.rs | |||
63 | documentation: None, | 63 | documentation: None, |
64 | lookup: None, | 64 | lookup: None, |
65 | insert_text: Some( | 65 | insert_text: Some( |
66 | "loop {$0}" | 66 | "return;" |
67 | ), | 67 | ), |
68 | insert_text_format: Snippet, | 68 | insert_text_format: Snippet, |
69 | source_range: [41; 41), | 69 | source_range: [41; 41), |
@@ -71,7 +71,7 @@ source: crates/ra_ide_api/src/completion/completion_item.rs | |||
71 | }, | 71 | }, |
72 | CompletionItem { | 72 | CompletionItem { |
73 | completion_kind: Keyword, | 73 | completion_kind: Keyword, |
74 | label: "return", | 74 | label: "while", |
75 | kind: Some( | 75 | kind: Some( |
76 | Keyword | 76 | Keyword |
77 | ), | 77 | ), |
@@ -79,7 +79,7 @@ source: crates/ra_ide_api/src/completion/completion_item.rs | |||
79 | documentation: None, | 79 | documentation: None, |
80 | lookup: None, | 80 | lookup: None, |
81 | insert_text: Some( | 81 | insert_text: Some( |
82 | "return;" | 82 | "while $0 {}" |
83 | ), | 83 | ), |
84 | insert_text_format: Snippet, | 84 | insert_text_format: Snippet, |
85 | source_range: [41; 41), | 85 | source_range: [41; 41), |
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 a56105f0c..0eec578be 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,13 +1,13 @@ | |||
1 | --- | 1 | --- |
2 | created: "2019-01-23T05:27:32.197423+00:00" | 2 | created: "2019-01-27T19:56:59.914744437+00:00" |
3 | creator: insta@0.4.0 | 3 | creator: insta@0.5.2 |
4 | expression: kind_completions | 4 | expression: kind_completions |
5 | source: crates/ra_ide_api/src/completion/completion_item.rs | 5 | source: crates/ra_ide_api/src/completion/completion_item.rs |
6 | --- | 6 | --- |
7 | [ | 7 | [ |
8 | CompletionItem { | 8 | CompletionItem { |
9 | completion_kind: Keyword, | 9 | completion_kind: Keyword, |
10 | label: "if", | 10 | label: "else", |
11 | kind: Some( | 11 | kind: Some( |
12 | Keyword | 12 | Keyword |
13 | ), | 13 | ), |
@@ -15,7 +15,7 @@ source: crates/ra_ide_api/src/completion/completion_item.rs | |||
15 | documentation: None, | 15 | documentation: None, |
16 | lookup: None, | 16 | lookup: None, |
17 | insert_text: Some( | 17 | insert_text: Some( |
18 | "if $0 {}" | 18 | "else {$0}" |
19 | ), | 19 | ), |
20 | insert_text_format: Snippet, | 20 | insert_text_format: Snippet, |
21 | source_range: [92; 92), | 21 | source_range: [92; 92), |
@@ -23,7 +23,7 @@ source: crates/ra_ide_api/src/completion/completion_item.rs | |||
23 | }, | 23 | }, |
24 | CompletionItem { | 24 | CompletionItem { |
25 | completion_kind: Keyword, | 25 | completion_kind: Keyword, |
26 | label: "match", | 26 | label: "else if", |
27 | kind: Some( | 27 | kind: Some( |
28 | Keyword | 28 | Keyword |
29 | ), | 29 | ), |
@@ -31,7 +31,7 @@ source: crates/ra_ide_api/src/completion/completion_item.rs | |||
31 | documentation: None, | 31 | documentation: None, |
32 | lookup: None, | 32 | lookup: None, |
33 | insert_text: Some( | 33 | insert_text: Some( |
34 | "match $0 {}" | 34 | "else if $0 {}" |
35 | ), | 35 | ), |
36 | insert_text_format: Snippet, | 36 | insert_text_format: Snippet, |
37 | source_range: [92; 92), | 37 | source_range: [92; 92), |
@@ -39,7 +39,7 @@ source: crates/ra_ide_api/src/completion/completion_item.rs | |||
39 | }, | 39 | }, |
40 | CompletionItem { | 40 | CompletionItem { |
41 | completion_kind: Keyword, | 41 | completion_kind: Keyword, |
42 | label: "while", | 42 | label: "if", |
43 | kind: Some( | 43 | kind: Some( |
44 | Keyword | 44 | Keyword |
45 | ), | 45 | ), |
@@ -47,7 +47,7 @@ source: crates/ra_ide_api/src/completion/completion_item.rs | |||
47 | documentation: None, | 47 | documentation: None, |
48 | lookup: None, | 48 | lookup: None, |
49 | insert_text: Some( | 49 | insert_text: Some( |
50 | "while $0 {}" | 50 | "if $0 {}" |
51 | ), | 51 | ), |
52 | insert_text_format: Snippet, | 52 | insert_text_format: Snippet, |
53 | source_range: [92; 92), | 53 | source_range: [92; 92), |
@@ -71,7 +71,7 @@ source: crates/ra_ide_api/src/completion/completion_item.rs | |||
71 | }, | 71 | }, |
72 | CompletionItem { | 72 | CompletionItem { |
73 | completion_kind: Keyword, | 73 | completion_kind: Keyword, |
74 | label: "else", | 74 | label: "match", |
75 | kind: Some( | 75 | kind: Some( |
76 | Keyword | 76 | Keyword |
77 | ), | 77 | ), |
@@ -79,7 +79,7 @@ source: crates/ra_ide_api/src/completion/completion_item.rs | |||
79 | documentation: None, | 79 | documentation: None, |
80 | lookup: None, | 80 | lookup: None, |
81 | insert_text: Some( | 81 | insert_text: Some( |
82 | "else {$0}" | 82 | "match $0 {}" |
83 | ), | 83 | ), |
84 | insert_text_format: Snippet, | 84 | insert_text_format: Snippet, |
85 | source_range: [92; 92), | 85 | source_range: [92; 92), |
@@ -87,7 +87,7 @@ source: crates/ra_ide_api/src/completion/completion_item.rs | |||
87 | }, | 87 | }, |
88 | CompletionItem { | 88 | CompletionItem { |
89 | completion_kind: Keyword, | 89 | completion_kind: Keyword, |
90 | label: "else if", | 90 | label: "return", |
91 | kind: Some( | 91 | kind: Some( |
92 | Keyword | 92 | Keyword |
93 | ), | 93 | ), |
@@ -95,7 +95,7 @@ source: crates/ra_ide_api/src/completion/completion_item.rs | |||
95 | documentation: None, | 95 | documentation: None, |
96 | lookup: None, | 96 | lookup: None, |
97 | insert_text: Some( | 97 | insert_text: Some( |
98 | "else if $0 {}" | 98 | "return;" |
99 | ), | 99 | ), |
100 | insert_text_format: Snippet, | 100 | insert_text_format: Snippet, |
101 | source_range: [92; 92), | 101 | source_range: [92; 92), |
@@ -103,7 +103,7 @@ source: crates/ra_ide_api/src/completion/completion_item.rs | |||
103 | }, | 103 | }, |
104 | CompletionItem { | 104 | CompletionItem { |
105 | completion_kind: Keyword, | 105 | completion_kind: Keyword, |
106 | label: "return", | 106 | label: "while", |
107 | kind: Some( | 107 | kind: Some( |
108 | Keyword | 108 | Keyword |
109 | ), | 109 | ), |
@@ -111,7 +111,7 @@ source: crates/ra_ide_api/src/completion/completion_item.rs | |||
111 | documentation: None, | 111 | documentation: None, |
112 | lookup: None, | 112 | lookup: None, |
113 | insert_text: Some( | 113 | insert_text: Some( |
114 | "return;" | 114 | "while $0 {}" |
115 | ), | 115 | ), |
116 | insert_text_format: Snippet, | 116 | insert_text_format: Snippet, |
117 | source_range: [92; 92), | 117 | source_range: [92; 92), |
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 84efab6f6..4b99f15e1 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,6 +1,6 @@ | |||
1 | --- | 1 | --- |
2 | created: "2019-01-23T05:27:32.200056+00:00" | 2 | created: "2019-01-27T19:56:59.927994050+00:00" |
3 | creator: insta@0.4.0 | 3 | creator: insta@0.5.2 |
4 | expression: kind_completions | 4 | expression: kind_completions |
5 | source: crates/ra_ide_api/src/completion/completion_item.rs | 5 | source: crates/ra_ide_api/src/completion/completion_item.rs |
6 | --- | 6 | --- |
@@ -23,7 +23,7 @@ source: crates/ra_ide_api/src/completion/completion_item.rs | |||
23 | }, | 23 | }, |
24 | CompletionItem { | 24 | CompletionItem { |
25 | completion_kind: Keyword, | 25 | completion_kind: Keyword, |
26 | label: "match", | 26 | label: "loop", |
27 | kind: Some( | 27 | kind: Some( |
28 | Keyword | 28 | Keyword |
29 | ), | 29 | ), |
@@ -31,7 +31,7 @@ source: crates/ra_ide_api/src/completion/completion_item.rs | |||
31 | documentation: None, | 31 | documentation: None, |
32 | lookup: None, | 32 | lookup: None, |
33 | insert_text: Some( | 33 | insert_text: Some( |
34 | "match $0 {}" | 34 | "loop {$0}" |
35 | ), | 35 | ), |
36 | insert_text_format: Snippet, | 36 | insert_text_format: Snippet, |
37 | source_range: [48; 48), | 37 | source_range: [48; 48), |
@@ -39,7 +39,7 @@ source: crates/ra_ide_api/src/completion/completion_item.rs | |||
39 | }, | 39 | }, |
40 | CompletionItem { | 40 | CompletionItem { |
41 | completion_kind: Keyword, | 41 | completion_kind: Keyword, |
42 | label: "while", | 42 | label: "match", |
43 | kind: Some( | 43 | kind: Some( |
44 | Keyword | 44 | Keyword |
45 | ), | 45 | ), |
@@ -47,7 +47,7 @@ source: crates/ra_ide_api/src/completion/completion_item.rs | |||
47 | documentation: None, | 47 | documentation: None, |
48 | lookup: None, | 48 | lookup: None, |
49 | insert_text: Some( | 49 | insert_text: Some( |
50 | "while $0 {}" | 50 | "match $0 {}" |
51 | ), | 51 | ), |
52 | insert_text_format: Snippet, | 52 | insert_text_format: Snippet, |
53 | source_range: [48; 48), | 53 | source_range: [48; 48), |
@@ -55,7 +55,7 @@ source: crates/ra_ide_api/src/completion/completion_item.rs | |||
55 | }, | 55 | }, |
56 | CompletionItem { | 56 | CompletionItem { |
57 | completion_kind: Keyword, | 57 | completion_kind: Keyword, |
58 | label: "loop", | 58 | label: "return", |
59 | kind: Some( | 59 | kind: Some( |
60 | Keyword | 60 | Keyword |
61 | ), | 61 | ), |
@@ -63,7 +63,7 @@ source: crates/ra_ide_api/src/completion/completion_item.rs | |||
63 | documentation: None, | 63 | documentation: None, |
64 | lookup: None, | 64 | lookup: None, |
65 | insert_text: Some( | 65 | insert_text: Some( |
66 | "loop {$0}" | 66 | "return $0;" |
67 | ), | 67 | ), |
68 | insert_text_format: Snippet, | 68 | insert_text_format: Snippet, |
69 | source_range: [48; 48), | 69 | source_range: [48; 48), |
@@ -71,7 +71,7 @@ source: crates/ra_ide_api/src/completion/completion_item.rs | |||
71 | }, | 71 | }, |
72 | CompletionItem { | 72 | CompletionItem { |
73 | completion_kind: Keyword, | 73 | completion_kind: Keyword, |
74 | label: "return", | 74 | label: "while", |
75 | kind: Some( | 75 | kind: Some( |
76 | Keyword | 76 | Keyword |
77 | ), | 77 | ), |
@@ -79,7 +79,7 @@ source: crates/ra_ide_api/src/completion/completion_item.rs | |||
79 | documentation: None, | 79 | documentation: None, |
80 | lookup: None, | 80 | lookup: None, |
81 | insert_text: Some( | 81 | insert_text: Some( |
82 | "return $0;" | 82 | "while $0 {}" |
83 | ), | 83 | ), |
84 | insert_text_format: Snippet, | 84 | insert_text_format: Snippet, |
85 | source_range: [48; 48), | 85 | source_range: [48; 48), |
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 8b254ce99..f8587f147 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,6 +1,6 @@ | |||
1 | --- | 1 | --- |
2 | created: "2019-01-23T05:27:32.314468+00:00" | 2 | created: "2019-01-27T20:00:15.604538211+00:00" |
3 | creator: insta@0.4.0 | 3 | creator: insta@0.5.2 |
4 | expression: kind_completions | 4 | expression: kind_completions |
5 | source: crates/ra_ide_api/src/completion/completion_item.rs | 5 | source: crates/ra_ide_api/src/completion/completion_item.rs |
6 | --- | 6 | --- |
@@ -23,7 +23,7 @@ source: crates/ra_ide_api/src/completion/completion_item.rs | |||
23 | }, | 23 | }, |
24 | CompletionItem { | 24 | CompletionItem { |
25 | completion_kind: Keyword, | 25 | completion_kind: Keyword, |
26 | label: "match", | 26 | label: "loop", |
27 | kind: Some( | 27 | kind: Some( |
28 | Keyword | 28 | Keyword |
29 | ), | 29 | ), |
@@ -31,7 +31,7 @@ source: crates/ra_ide_api/src/completion/completion_item.rs | |||
31 | documentation: None, | 31 | documentation: None, |
32 | lookup: None, | 32 | lookup: None, |
33 | insert_text: Some( | 33 | insert_text: Some( |
34 | "match $0 {}" | 34 | "loop {$0}" |
35 | ), | 35 | ), |
36 | insert_text_format: Snippet, | 36 | insert_text_format: Snippet, |
37 | source_range: [41; 41), | 37 | source_range: [41; 41), |
@@ -39,7 +39,7 @@ source: crates/ra_ide_api/src/completion/completion_item.rs | |||
39 | }, | 39 | }, |
40 | CompletionItem { | 40 | CompletionItem { |
41 | completion_kind: Keyword, | 41 | completion_kind: Keyword, |
42 | label: "while", | 42 | label: "match", |
43 | kind: Some( | 43 | kind: Some( |
44 | Keyword | 44 | Keyword |
45 | ), | 45 | ), |
@@ -47,7 +47,7 @@ source: crates/ra_ide_api/src/completion/completion_item.rs | |||
47 | documentation: None, | 47 | documentation: None, |
48 | lookup: None, | 48 | lookup: None, |
49 | insert_text: Some( | 49 | insert_text: Some( |
50 | "while $0 {}" | 50 | "match $0 {}" |
51 | ), | 51 | ), |
52 | insert_text_format: Snippet, | 52 | insert_text_format: Snippet, |
53 | source_range: [41; 41), | 53 | source_range: [41; 41), |
@@ -55,7 +55,7 @@ source: crates/ra_ide_api/src/completion/completion_item.rs | |||
55 | }, | 55 | }, |
56 | CompletionItem { | 56 | CompletionItem { |
57 | completion_kind: Keyword, | 57 | completion_kind: Keyword, |
58 | label: "loop", | 58 | label: "return", |
59 | kind: Some( | 59 | kind: Some( |
60 | Keyword | 60 | Keyword |
61 | ), | 61 | ), |
@@ -63,7 +63,7 @@ source: crates/ra_ide_api/src/completion/completion_item.rs | |||
63 | documentation: None, | 63 | documentation: None, |
64 | lookup: None, | 64 | lookup: None, |
65 | insert_text: Some( | 65 | insert_text: Some( |
66 | "loop {$0}" | 66 | "return;" |
67 | ), | 67 | ), |
68 | insert_text_format: Snippet, | 68 | insert_text_format: Snippet, |
69 | source_range: [41; 41), | 69 | source_range: [41; 41), |
@@ -71,7 +71,7 @@ source: crates/ra_ide_api/src/completion/completion_item.rs | |||
71 | }, | 71 | }, |
72 | CompletionItem { | 72 | CompletionItem { |
73 | completion_kind: Keyword, | 73 | completion_kind: Keyword, |
74 | label: "return", | 74 | label: "while", |
75 | kind: Some( | 75 | kind: Some( |
76 | Keyword | 76 | Keyword |
77 | ), | 77 | ), |
@@ -79,7 +79,7 @@ source: crates/ra_ide_api/src/completion/completion_item.rs | |||
79 | documentation: None, | 79 | documentation: None, |
80 | lookup: None, | 80 | lookup: None, |
81 | insert_text: Some( | 81 | insert_text: Some( |
82 | "return;" | 82 | "while $0 {}" |
83 | ), | 83 | ), |
84 | insert_text_format: Snippet, | 84 | insert_text_format: Snippet, |
85 | source_range: [41; 41), | 85 | source_range: [41; 41), |
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 d36b555db..3c27e079f 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,6 +1,6 @@ | |||
1 | --- | 1 | --- |
2 | created: "2019-01-23T05:27:32.197624+00:00" | 2 | created: "2019-01-27T19:56:59.918882346+00:00" |
3 | creator: insta@0.4.0 | 3 | creator: insta@0.5.2 |
4 | expression: kind_completions | 4 | expression: kind_completions |
5 | source: crates/ra_ide_api/src/completion/completion_item.rs | 5 | source: crates/ra_ide_api/src/completion/completion_item.rs |
6 | --- | 6 | --- |
@@ -23,7 +23,7 @@ source: crates/ra_ide_api/src/completion/completion_item.rs | |||
23 | }, | 23 | }, |
24 | CompletionItem { | 24 | CompletionItem { |
25 | completion_kind: Keyword, | 25 | completion_kind: Keyword, |
26 | label: "match", | 26 | label: "loop", |
27 | kind: Some( | 27 | kind: Some( |
28 | Keyword | 28 | Keyword |
29 | ), | 29 | ), |
@@ -31,7 +31,7 @@ source: crates/ra_ide_api/src/completion/completion_item.rs | |||
31 | documentation: None, | 31 | documentation: None, |
32 | lookup: None, | 32 | lookup: None, |
33 | insert_text: Some( | 33 | insert_text: Some( |
34 | "match $0 {}" | 34 | "loop {$0}" |
35 | ), | 35 | ), |
36 | insert_text_format: Snippet, | 36 | insert_text_format: Snippet, |
37 | source_range: [83; 83), | 37 | source_range: [83; 83), |
@@ -39,7 +39,7 @@ source: crates/ra_ide_api/src/completion/completion_item.rs | |||
39 | }, | 39 | }, |
40 | CompletionItem { | 40 | CompletionItem { |
41 | completion_kind: Keyword, | 41 | completion_kind: Keyword, |
42 | label: "while", | 42 | label: "match", |
43 | kind: Some( | 43 | kind: Some( |
44 | Keyword | 44 | Keyword |
45 | ), | 45 | ), |
@@ -47,7 +47,7 @@ source: crates/ra_ide_api/src/completion/completion_item.rs | |||
47 | documentation: None, | 47 | documentation: None, |
48 | lookup: None, | 48 | lookup: None, |
49 | insert_text: Some( | 49 | insert_text: Some( |
50 | "while $0 {}" | 50 | "match $0 {}" |
51 | ), | 51 | ), |
52 | insert_text_format: Snippet, | 52 | insert_text_format: Snippet, |
53 | source_range: [83; 83), | 53 | source_range: [83; 83), |
@@ -55,7 +55,7 @@ source: crates/ra_ide_api/src/completion/completion_item.rs | |||
55 | }, | 55 | }, |
56 | CompletionItem { | 56 | CompletionItem { |
57 | completion_kind: Keyword, | 57 | completion_kind: Keyword, |
58 | label: "loop", | 58 | label: "return", |
59 | kind: Some( | 59 | kind: Some( |
60 | Keyword | 60 | Keyword |
61 | ), | 61 | ), |
@@ -63,7 +63,7 @@ source: crates/ra_ide_api/src/completion/completion_item.rs | |||
63 | documentation: None, | 63 | documentation: None, |
64 | lookup: None, | 64 | lookup: None, |
65 | insert_text: Some( | 65 | insert_text: Some( |
66 | "loop {$0}" | 66 | "return $0;" |
67 | ), | 67 | ), |
68 | insert_text_format: Snippet, | 68 | insert_text_format: Snippet, |
69 | source_range: [83; 83), | 69 | source_range: [83; 83), |
@@ -71,7 +71,7 @@ source: crates/ra_ide_api/src/completion/completion_item.rs | |||
71 | }, | 71 | }, |
72 | CompletionItem { | 72 | CompletionItem { |
73 | completion_kind: Keyword, | 73 | completion_kind: Keyword, |
74 | label: "return", | 74 | label: "while", |
75 | kind: Some( | 75 | kind: Some( |
76 | Keyword | 76 | Keyword |
77 | ), | 77 | ), |
@@ -79,7 +79,7 @@ source: crates/ra_ide_api/src/completion/completion_item.rs | |||
79 | documentation: None, | 79 | documentation: None, |
80 | lookup: None, | 80 | lookup: None, |
81 | insert_text: Some( | 81 | insert_text: Some( |
82 | "return $0;" | 82 | "while $0 {}" |
83 | ), | 83 | ), |
84 | insert_text_format: Snippet, | 84 | insert_text_format: Snippet, |
85 | source_range: [83; 83), | 85 | source_range: [83; 83), |
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 d74483c0b..d1be8c6e7 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,6 +1,6 @@ | |||
1 | --- | 1 | --- |
2 | created: "2019-01-23T05:27:32.302452+00:00" | 2 | created: "2019-01-27T20:00:15.604282112+00:00" |
3 | creator: insta@0.4.0 | 3 | creator: insta@0.5.2 |
4 | expression: kind_completions | 4 | expression: kind_completions |
5 | source: crates/ra_ide_api/src/completion/completion_item.rs | 5 | source: crates/ra_ide_api/src/completion/completion_item.rs |
6 | --- | 6 | --- |
@@ -23,7 +23,7 @@ source: crates/ra_ide_api/src/completion/completion_item.rs | |||
23 | }, | 23 | }, |
24 | CompletionItem { | 24 | CompletionItem { |
25 | completion_kind: Keyword, | 25 | completion_kind: Keyword, |
26 | label: "match", | 26 | label: "loop", |
27 | kind: Some( | 27 | kind: Some( |
28 | Keyword | 28 | Keyword |
29 | ), | 29 | ), |
@@ -31,7 +31,7 @@ source: crates/ra_ide_api/src/completion/completion_item.rs | |||
31 | documentation: None, | 31 | documentation: None, |
32 | lookup: None, | 32 | lookup: None, |
33 | insert_text: Some( | 33 | insert_text: Some( |
34 | "match $0 {}" | 34 | "loop {$0}" |
35 | ), | 35 | ), |
36 | insert_text_format: Snippet, | 36 | insert_text_format: Snippet, |
37 | source_range: [83; 83), | 37 | source_range: [83; 83), |
@@ -39,7 +39,7 @@ source: crates/ra_ide_api/src/completion/completion_item.rs | |||
39 | }, | 39 | }, |
40 | CompletionItem { | 40 | CompletionItem { |
41 | completion_kind: Keyword, | 41 | completion_kind: Keyword, |
42 | label: "while", | 42 | label: "match", |
43 | kind: Some( | 43 | kind: Some( |
44 | Keyword | 44 | Keyword |
45 | ), | 45 | ), |
@@ -47,7 +47,7 @@ source: crates/ra_ide_api/src/completion/completion_item.rs | |||
47 | documentation: None, | 47 | documentation: None, |
48 | lookup: None, | 48 | lookup: None, |
49 | insert_text: Some( | 49 | insert_text: Some( |
50 | "while $0 {}" | 50 | "match $0 {}" |
51 | ), | 51 | ), |
52 | insert_text_format: Snippet, | 52 | insert_text_format: Snippet, |
53 | source_range: [83; 83), | 53 | source_range: [83; 83), |
@@ -55,7 +55,7 @@ source: crates/ra_ide_api/src/completion/completion_item.rs | |||
55 | }, | 55 | }, |
56 | CompletionItem { | 56 | CompletionItem { |
57 | completion_kind: Keyword, | 57 | completion_kind: Keyword, |
58 | label: "loop", | 58 | label: "return", |
59 | kind: Some( | 59 | kind: Some( |
60 | Keyword | 60 | Keyword |
61 | ), | 61 | ), |
@@ -63,7 +63,7 @@ source: crates/ra_ide_api/src/completion/completion_item.rs | |||
63 | documentation: None, | 63 | documentation: None, |
64 | lookup: None, | 64 | lookup: None, |
65 | insert_text: Some( | 65 | insert_text: Some( |
66 | "loop {$0}" | 66 | "return $0;" |
67 | ), | 67 | ), |
68 | insert_text_format: Snippet, | 68 | insert_text_format: Snippet, |
69 | source_range: [83; 83), | 69 | source_range: [83; 83), |
@@ -71,7 +71,7 @@ source: crates/ra_ide_api/src/completion/completion_item.rs | |||
71 | }, | 71 | }, |
72 | CompletionItem { | 72 | CompletionItem { |
73 | completion_kind: Keyword, | 73 | completion_kind: Keyword, |
74 | label: "return", | 74 | label: "while", |
75 | kind: Some( | 75 | kind: Some( |
76 | Keyword | 76 | Keyword |
77 | ), | 77 | ), |
@@ -79,7 +79,7 @@ source: crates/ra_ide_api/src/completion/completion_item.rs | |||
79 | documentation: None, | 79 | documentation: None, |
80 | lookup: None, | 80 | lookup: None, |
81 | insert_text: Some( | 81 | insert_text: Some( |
82 | "return $0;" | 82 | "while $0 {}" |
83 | ), | 83 | ), |
84 | insert_text_format: Snippet, | 84 | insert_text_format: Snippet, |
85 | source_range: [83; 83), | 85 | source_range: [83; 83), |
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 a87880ab3..f6bba49ae 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,25 +1,21 @@ | |||
1 | --- | 1 | --- |
2 | created: "2019-01-23T07:42:59.657718+00:00" | 2 | created: "2019-01-27T19:56:59.953151082+00:00" |
3 | creator: insta@0.4.0 | 3 | creator: insta@0.5.2 |
4 | expression: kind_completions | 4 | expression: kind_completions |
5 | source: crates/ra_ide_api/src/completion/completion_item.rs | 5 | source: crates/ra_ide_api/src/completion/completion_item.rs |
6 | --- | 6 | --- |
7 | [ | 7 | [ |
8 | CompletionItem { | 8 | CompletionItem { |
9 | completion_kind: Reference, | 9 | completion_kind: Reference, |
10 | label: "quux", | 10 | label: "Baz", |
11 | kind: Some( | 11 | kind: Some( |
12 | Function | 12 | Enum |
13 | ), | ||
14 | detail: Some( | ||
15 | "fn quux()" | ||
16 | ), | 13 | ), |
14 | detail: None, | ||
17 | documentation: None, | 15 | documentation: None, |
18 | lookup: None, | 16 | lookup: None, |
19 | insert_text: Some( | 17 | insert_text: None, |
20 | "quux()$0" | 18 | insert_text_format: PlainText, |
21 | ), | ||
22 | insert_text_format: Snippet, | ||
23 | source_range: [89; 89), | 19 | source_range: [89; 89), |
24 | text_edit: None | 20 | text_edit: None |
25 | }, | 21 | }, |
@@ -39,15 +35,19 @@ source: crates/ra_ide_api/src/completion/completion_item.rs | |||
39 | }, | 35 | }, |
40 | CompletionItem { | 36 | CompletionItem { |
41 | completion_kind: Reference, | 37 | completion_kind: Reference, |
42 | label: "Baz", | 38 | label: "quux", |
43 | kind: Some( | 39 | kind: Some( |
44 | Enum | 40 | Function |
41 | ), | ||
42 | detail: Some( | ||
43 | "fn quux()" | ||
45 | ), | 44 | ), |
46 | detail: None, | ||
47 | documentation: None, | 45 | documentation: None, |
48 | lookup: None, | 46 | lookup: None, |
49 | insert_text: None, | 47 | insert_text: Some( |
50 | insert_text_format: PlainText, | 48 | "quux()$0" |
49 | ), | ||
50 | insert_text_format: Snippet, | ||
51 | source_range: [89; 89), | 51 | source_range: [89; 89), |
52 | text_edit: None | 52 | text_edit: None |
53 | } | 53 | } |
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 f95d10926..7c458664e 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,39 +1,39 @@ | |||
1 | --- | 1 | --- |
2 | created: "2019-01-23T07:42:59.657837+00:00" | 2 | created: "2019-01-27T19:56:59.959185284+00:00" |
3 | creator: insta@0.4.0 | 3 | creator: insta@0.5.2 |
4 | expression: kind_completions | 4 | expression: kind_completions |
5 | source: crates/ra_ide_api/src/completion/completion_item.rs | 5 | source: crates/ra_ide_api/src/completion/completion_item.rs |
6 | --- | 6 | --- |
7 | [ | 7 | [ |
8 | CompletionItem { | 8 | CompletionItem { |
9 | completion_kind: Reference, | 9 | completion_kind: Reference, |
10 | label: "quux", | 10 | label: "Bar", |
11 | kind: Some( | 11 | kind: Some( |
12 | Function | 12 | Struct |
13 | ), | ||
14 | detail: Some( | ||
15 | "fn quux()" | ||
16 | ), | 13 | ), |
14 | detail: None, | ||
17 | documentation: None, | 15 | documentation: None, |
18 | lookup: None, | 16 | lookup: None, |
19 | insert_text: Some( | 17 | insert_text: None, |
20 | "quux()$0" | 18 | insert_text_format: PlainText, |
21 | ), | ||
22 | insert_text_format: Snippet, | ||
23 | source_range: [101; 101), | 19 | source_range: [101; 101), |
24 | text_edit: None | 20 | text_edit: None |
25 | }, | 21 | }, |
26 | CompletionItem { | 22 | CompletionItem { |
27 | completion_kind: Reference, | 23 | completion_kind: Reference, |
28 | label: "Bar", | 24 | label: "quux", |
29 | kind: Some( | 25 | kind: Some( |
30 | Struct | 26 | Function |
27 | ), | ||
28 | detail: Some( | ||
29 | "fn quux()" | ||
31 | ), | 30 | ), |
32 | detail: None, | ||
33 | documentation: None, | 31 | documentation: None, |
34 | lookup: None, | 32 | lookup: None, |
35 | insert_text: None, | 33 | insert_text: Some( |
36 | insert_text_format: PlainText, | 34 | "quux()$0" |
35 | ), | ||
36 | insert_text_format: Snippet, | ||
37 | source_range: [101; 101), | 37 | source_range: [101; 101), |
38 | text_edit: None | 38 | text_edit: None |
39 | } | 39 | } |
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 a5164b03e..5a35d9ca9 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,13 +1,13 @@ | |||
1 | --- | 1 | --- |
2 | created: "2019-01-22T14:45:00.651095300+00:00" | 2 | created: "2019-01-27T19:56:59.922933445+00:00" |
3 | creator: insta@0.4.0 | 3 | creator: insta@0.5.2 |
4 | expression: kind_completions | 4 | expression: kind_completions |
5 | source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs" | 5 | source: crates/ra_ide_api/src/completion/completion_item.rs |
6 | --- | 6 | --- |
7 | [ | 7 | [ |
8 | CompletionItem { | 8 | CompletionItem { |
9 | completion_kind: Keyword, | 9 | completion_kind: Keyword, |
10 | label: "if", | 10 | label: "break", |
11 | kind: Some( | 11 | kind: Some( |
12 | Keyword | 12 | Keyword |
13 | ), | 13 | ), |
@@ -15,7 +15,7 @@ source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs" | |||
15 | documentation: None, | 15 | documentation: None, |
16 | lookup: None, | 16 | lookup: None, |
17 | insert_text: Some( | 17 | insert_text: Some( |
18 | "if $0 {}" | 18 | "break" |
19 | ), | 19 | ), |
20 | insert_text_format: Snippet, | 20 | insert_text_format: Snippet, |
21 | source_range: [106; 108), | 21 | source_range: [106; 108), |
@@ -23,7 +23,7 @@ source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs" | |||
23 | }, | 23 | }, |
24 | CompletionItem { | 24 | CompletionItem { |
25 | completion_kind: Keyword, | 25 | completion_kind: Keyword, |
26 | label: "match", | 26 | label: "continue", |
27 | kind: Some( | 27 | kind: Some( |
28 | Keyword | 28 | Keyword |
29 | ), | 29 | ), |
@@ -31,7 +31,7 @@ source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs" | |||
31 | documentation: None, | 31 | documentation: None, |
32 | lookup: None, | 32 | lookup: None, |
33 | insert_text: Some( | 33 | insert_text: Some( |
34 | "match $0 {}" | 34 | "continue" |
35 | ), | 35 | ), |
36 | insert_text_format: Snippet, | 36 | insert_text_format: Snippet, |
37 | source_range: [106; 108), | 37 | source_range: [106; 108), |
@@ -39,7 +39,7 @@ source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs" | |||
39 | }, | 39 | }, |
40 | CompletionItem { | 40 | CompletionItem { |
41 | completion_kind: Keyword, | 41 | completion_kind: Keyword, |
42 | label: "while", | 42 | label: "if", |
43 | kind: Some( | 43 | kind: Some( |
44 | Keyword | 44 | Keyword |
45 | ), | 45 | ), |
@@ -47,7 +47,7 @@ source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs" | |||
47 | documentation: None, | 47 | documentation: None, |
48 | lookup: None, | 48 | lookup: None, |
49 | insert_text: Some( | 49 | insert_text: Some( |
50 | "while $0 {}" | 50 | "if $0 {}" |
51 | ), | 51 | ), |
52 | insert_text_format: Snippet, | 52 | insert_text_format: Snippet, |
53 | source_range: [106; 108), | 53 | source_range: [106; 108), |
@@ -71,7 +71,7 @@ source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs" | |||
71 | }, | 71 | }, |
72 | CompletionItem { | 72 | CompletionItem { |
73 | completion_kind: Keyword, | 73 | completion_kind: Keyword, |
74 | label: "continue", | 74 | label: "match", |
75 | kind: Some( | 75 | kind: Some( |
76 | Keyword | 76 | Keyword |
77 | ), | 77 | ), |
@@ -79,7 +79,7 @@ source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs" | |||
79 | documentation: None, | 79 | documentation: None, |
80 | lookup: None, | 80 | lookup: None, |
81 | insert_text: Some( | 81 | insert_text: Some( |
82 | "continue" | 82 | "match $0 {}" |
83 | ), | 83 | ), |
84 | insert_text_format: Snippet, | 84 | insert_text_format: Snippet, |
85 | source_range: [106; 108), | 85 | source_range: [106; 108), |
@@ -87,7 +87,7 @@ source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs" | |||
87 | }, | 87 | }, |
88 | CompletionItem { | 88 | CompletionItem { |
89 | completion_kind: Keyword, | 89 | completion_kind: Keyword, |
90 | label: "break", | 90 | label: "return", |
91 | kind: Some( | 91 | kind: Some( |
92 | Keyword | 92 | Keyword |
93 | ), | 93 | ), |
@@ -95,7 +95,7 @@ source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs" | |||
95 | documentation: None, | 95 | documentation: None, |
96 | lookup: None, | 96 | lookup: None, |
97 | insert_text: Some( | 97 | insert_text: Some( |
98 | "break" | 98 | "return" |
99 | ), | 99 | ), |
100 | insert_text_format: Snippet, | 100 | insert_text_format: Snippet, |
101 | source_range: [106; 108), | 101 | source_range: [106; 108), |
@@ -103,7 +103,7 @@ source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs" | |||
103 | }, | 103 | }, |
104 | CompletionItem { | 104 | CompletionItem { |
105 | completion_kind: Keyword, | 105 | completion_kind: Keyword, |
106 | label: "return", | 106 | label: "while", |
107 | kind: Some( | 107 | kind: Some( |
108 | Keyword | 108 | Keyword |
109 | ), | 109 | ), |
@@ -111,7 +111,7 @@ source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs" | |||
111 | documentation: None, | 111 | documentation: None, |
112 | lookup: None, | 112 | lookup: None, |
113 | insert_text: Some( | 113 | insert_text: Some( |
114 | "return" | 114 | "while $0 {}" |
115 | ), | 115 | ), |
116 | insert_text_format: Snippet, | 116 | insert_text_format: Snippet, |
117 | source_range: [106; 108), | 117 | source_range: [106; 108), |
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 5f5df0033..4d5c7a869 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 | --- |
2 | created: "2019-01-23T13:19:23.501353210+00:00" | 2 | created: "2019-01-27T19:56:59.910113268+00:00" |
3 | creator: [email protected] | 3 | creator: [email protected] |
4 | expression: kind_completions | 4 | expression: kind_completions |
5 | source: crates/ra_ide_api/src/completion/completion_item.rs | 5 | source: crates/ra_ide_api/src/completion/completion_item.rs |
@@ -7,35 +7,35 @@ source: crates/ra_ide_api/src/completion/completion_item.rs | |||
7 | [ | 7 | [ |
8 | CompletionItem { | 8 | CompletionItem { |
9 | completion_kind: Reference, | 9 | completion_kind: Reference, |
10 | label: "the_field", | 10 | label: "foo", |
11 | kind: Some( | 11 | kind: Some( |
12 | Field | 12 | Method |
13 | ), | 13 | ), |
14 | detail: Some( | 14 | detail: Some( |
15 | "(u32, i32)" | 15 | "fn foo(&self)" |
16 | ), | 16 | ), |
17 | documentation: None, | 17 | documentation: None, |
18 | lookup: None, | 18 | lookup: None, |
19 | insert_text: None, | 19 | insert_text: Some( |
20 | insert_text_format: PlainText, | 20 | "foo()$0" |
21 | ), | ||
22 | insert_text_format: Snippet, | ||
21 | source_range: [126; 126), | 23 | source_range: [126; 126), |
22 | text_edit: None | 24 | text_edit: None |
23 | }, | 25 | }, |
24 | CompletionItem { | 26 | CompletionItem { |
25 | completion_kind: Reference, | 27 | completion_kind: Reference, |
26 | label: "foo", | 28 | label: "the_field", |
27 | kind: Some( | 29 | kind: Some( |
28 | Method | 30 | Field |
29 | ), | 31 | ), |
30 | detail: Some( | 32 | detail: Some( |
31 | "fn foo(&self)" | 33 | "(u32, i32)" |
32 | ), | 34 | ), |
33 | documentation: None, | 35 | documentation: None, |
34 | lookup: None, | 36 | lookup: None, |
35 | insert_text: Some( | 37 | insert_text: None, |
36 | "foo()$0" | 38 | insert_text_format: PlainText, |
37 | ), | ||
38 | insert_text_format: Snippet, | ||
39 | source_range: [126; 126), | 39 | source_range: [126; 126), |
40 | text_edit: None | 40 | text_edit: None |
41 | } | 41 | } |
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 580e92a90..1073d90fd 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 | --- |
2 | created: "2019-01-25T19:27:09.519688600+00:00" | 2 | created: "2019-01-27T19:56:59.909689544+00:00" |
3 | creator: [email protected] | 3 | creator: [email protected] |
4 | expression: kind_completions | 4 | expression: kind_completions |
5 | source: crates/ra_ide_api/src/completion/completion_item.rs | 5 | source: crates/ra_ide_api/src/completion/completion_item.rs |
@@ -7,39 +7,39 @@ source: crates/ra_ide_api/src/completion/completion_item.rs | |||
7 | [ | 7 | [ |
8 | CompletionItem { | 8 | CompletionItem { |
9 | completion_kind: Reference, | 9 | completion_kind: Reference, |
10 | label: "the_field", | 10 | label: "foo", |
11 | kind: Some( | 11 | kind: Some( |
12 | Field | 12 | Method |
13 | ), | 13 | ), |
14 | detail: Some( | 14 | detail: Some( |
15 | "(u32,)" | 15 | "fn foo(self)" |
16 | ), | ||
17 | documentation: Some( | ||
18 | Documentation( | ||
19 | "This is the_field" | ||
20 | ) | ||
21 | ), | 16 | ), |
17 | documentation: None, | ||
22 | lookup: None, | 18 | lookup: None, |
23 | insert_text: None, | 19 | insert_text: Some( |
24 | insert_text_format: PlainText, | 20 | "foo()$0" |
21 | ), | ||
22 | insert_text_format: Snippet, | ||
25 | source_range: [187; 187), | 23 | source_range: [187; 187), |
26 | text_edit: None | 24 | text_edit: None |
27 | }, | 25 | }, |
28 | CompletionItem { | 26 | CompletionItem { |
29 | completion_kind: Reference, | 27 | completion_kind: Reference, |
30 | label: "foo", | 28 | label: "the_field", |
31 | kind: Some( | 29 | kind: Some( |
32 | Method | 30 | Field |
33 | ), | 31 | ), |
34 | detail: Some( | 32 | detail: Some( |
35 | "fn foo(self)" | 33 | "(u32,)" |
36 | ), | 34 | ), |
37 | documentation: None, | 35 | documentation: Some( |
38 | lookup: None, | 36 | Documentation( |
39 | insert_text: Some( | 37 | "This is the_field" |
40 | "foo()$0" | 38 | ) |
41 | ), | 39 | ), |
42 | insert_text_format: Snippet, | 40 | lookup: None, |
41 | insert_text: None, | ||
42 | insert_text_format: PlainText, | ||
43 | source_range: [187; 187), | 43 | source_range: [187; 187), |
44 | text_edit: None | 44 | text_edit: None |
45 | } | 45 | } |