From cf5c99271d79e98332d6e7d35f885b7c79177238 Mon Sep 17 00:00:00 2001 From: Florian Diebold Date: Sun, 27 Jan 2019 21:02:24 +0100 Subject: Sort completions in tests --- .../ra_ide_api/src/completion/completion_item.rs | 3 +- .../completion_item__bindings_from_for.snap | 32 +++++++++--------- .../completion_item__bindings_from_if_let.snap | 8 ++--- .../completion_item__bindings_from_let.snap | 32 +++++++++--------- ...em__completes_break_and_continue_in_loops1.snap | 28 ++++++++-------- ...em__completes_break_and_continue_in_loops2.snap | 20 ++++++------ ...t_add_semi_after_return_if_not_a_statement.snap | 20 ++++++------ ...ont_render_function_parens_if_already_call.snap | 14 ++++---- .../snapshots/completion_item__enum_variant.snap | 14 ++++---- ...completion_item__enum_variant_with_details.snap | 14 ++++---- ...ompletion_item__filter_postfix_completion1.snap | 18 +++++----- ...ompletion_item__filter_postfix_completion2.snap | 18 +++++----- ...ompletion_item__filter_postfix_completion3.snap | 16 ++++----- ...n_item__inserts_parens_for_function_calls1.snap | 18 +++++----- .../completion_item__keywords_in_function1.snap | 20 ++++++------ .../completion_item__keywords_in_function2.snap | 28 ++++++++-------- .../completion_item__keywords_in_function3.snap | 20 ++++++------ .../completion_item__keywords_in_function4.snap | 20 ++++++------ ...etion_item__last_return_in_block_has_semi1.snap | 20 ++++++------ ...etion_item__last_return_in_block_has_semi2.snap | 20 ++++++------ .../snapshots/completion_item__module_items.snap | 32 +++++++++--------- ...etion_item__module_items_in_nested_modules.snap | 32 +++++++++--------- ...item__no_semi_after_break_continue_in_expr.snap | 30 ++++++++--------- ...on_item__struct_field_completion_autoderef.snap | 26 +++++++-------- ...pletion_item__struct_field_completion_self.snap | 38 +++++++++++----------- 25 files changed, 271 insertions(+), 270 deletions(-) (limited to 'crates') 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 }; let completions = completions(&analysis.db, position).unwrap(); let completion_items: Vec = completions.into(); - let kind_completions: Vec = completion_items + let mut kind_completions: Vec = completion_items .into_iter() .filter(|c| c.completion_kind == kind) .collect(); + kind_completions.sort_by_key(|c| c.label.clone()); assert_debug_snapshot_matches!(test_name, kind_completions); } 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,24 +1,10 @@ --- -created: "2019-01-23T07:42:59.656273+00:00" -creator: insta@0.4.0 +created: "2019-01-27T19:56:59.944446814+00:00" +creator: insta@0.5.2 expression: kind_completions source: crates/ra_ide_api/src/completion/completion_item.rs --- [ - CompletionItem { - completion_kind: Reference, - label: "x", - kind: Some( - Binding - ), - detail: None, - documentation: None, - lookup: None, - insert_text: None, - insert_text_format: PlainText, - source_range: [83; 83), - text_edit: None - }, CompletionItem { completion_kind: Reference, label: "quux", @@ -36,5 +22,19 @@ source: crates/ra_ide_api/src/completion/completion_item.rs insert_text_format: Snippet, source_range: [83; 83), text_edit: None + }, + CompletionItem { + completion_kind: Reference, + label: "x", + kind: Some( + Binding + ), + detail: None, + documentation: None, + lookup: None, + insert_text: None, + insert_text_format: PlainText, + source_range: [83; 83), + text_edit: None } ] 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 @@ --- -created: "2019-01-23T07:42:59.658419+00:00" -creator: insta@0.4.0 +created: "2019-01-27T19:56:59.946956414+00:00" +creator: insta@0.5.2 expression: kind_completions source: crates/ra_ide_api/src/completion/completion_item.rs --- [ CompletionItem { completion_kind: Reference, - label: "b", + label: "a", kind: Some( Binding ), @@ -21,7 +21,7 @@ source: crates/ra_ide_api/src/completion/completion_item.rs }, CompletionItem { completion_kind: Reference, - label: "a", + label: "b", kind: Some( Binding ), 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 @@ --- -created: "2019-01-23T07:42:59.657713+00:00" -creator: insta@0.4.0 +created: "2019-01-27T19:56:59.948953759+00:00" +creator: insta@0.5.2 expression: kind_completions source: crates/ra_ide_api/src/completion/completion_item.rs --- [ CompletionItem { completion_kind: Reference, - label: "y", + label: "quux", kind: Some( - Binding + Function + ), + detail: Some( + "fn quux(x: i32)" ), - detail: None, documentation: None, lookup: None, - insert_text: None, - insert_text_format: PlainText, + insert_text: Some( + "quux($0)" + ), + insert_text_format: Snippet, source_range: [79; 79), text_edit: None }, @@ -35,19 +39,15 @@ source: crates/ra_ide_api/src/completion/completion_item.rs }, CompletionItem { completion_kind: Reference, - label: "quux", + label: "y", kind: Some( - Function - ), - detail: Some( - "fn quux(x: i32)" + Binding ), + detail: None, documentation: None, lookup: None, - insert_text: Some( - "quux($0)" - ), - insert_text_format: Snippet, + insert_text: None, + insert_text_format: PlainText, source_range: [79; 79), text_edit: None } 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 @@ --- -created: "2019-01-23T05:27:32.197434+00:00" -creator: insta@0.4.0 +created: "2019-01-27T19:56:59.913816522+00:00" +creator: insta@0.5.2 expression: kind_completions source: crates/ra_ide_api/src/completion/completion_item.rs --- [ CompletionItem { completion_kind: Keyword, - label: "if", + label: "break", kind: Some( Keyword ), @@ -15,7 +15,7 @@ source: crates/ra_ide_api/src/completion/completion_item.rs documentation: None, lookup: None, insert_text: Some( - "if $0 {}" + "break;" ), insert_text_format: Snippet, source_range: [55; 55), @@ -23,7 +23,7 @@ source: crates/ra_ide_api/src/completion/completion_item.rs }, CompletionItem { completion_kind: Keyword, - label: "match", + label: "continue", kind: Some( Keyword ), @@ -31,7 +31,7 @@ source: crates/ra_ide_api/src/completion/completion_item.rs documentation: None, lookup: None, insert_text: Some( - "match $0 {}" + "continue;" ), insert_text_format: Snippet, source_range: [55; 55), @@ -39,7 +39,7 @@ source: crates/ra_ide_api/src/completion/completion_item.rs }, CompletionItem { completion_kind: Keyword, - label: "while", + label: "if", kind: Some( Keyword ), @@ -47,7 +47,7 @@ source: crates/ra_ide_api/src/completion/completion_item.rs documentation: None, lookup: None, insert_text: Some( - "while $0 {}" + "if $0 {}" ), insert_text_format: Snippet, source_range: [55; 55), @@ -71,7 +71,7 @@ source: crates/ra_ide_api/src/completion/completion_item.rs }, CompletionItem { completion_kind: Keyword, - label: "continue", + label: "match", kind: Some( Keyword ), @@ -79,7 +79,7 @@ source: crates/ra_ide_api/src/completion/completion_item.rs documentation: None, lookup: None, insert_text: Some( - "continue;" + "match $0 {}" ), insert_text_format: Snippet, source_range: [55; 55), @@ -87,7 +87,7 @@ source: crates/ra_ide_api/src/completion/completion_item.rs }, CompletionItem { completion_kind: Keyword, - label: "break", + label: "return", kind: Some( Keyword ), @@ -95,7 +95,7 @@ source: crates/ra_ide_api/src/completion/completion_item.rs documentation: None, lookup: None, insert_text: Some( - "break;" + "return $0;" ), insert_text_format: Snippet, source_range: [55; 55), @@ -103,7 +103,7 @@ source: crates/ra_ide_api/src/completion/completion_item.rs }, CompletionItem { completion_kind: Keyword, - label: "return", + label: "while", kind: Some( Keyword ), @@ -111,7 +111,7 @@ source: crates/ra_ide_api/src/completion/completion_item.rs documentation: None, lookup: None, insert_text: Some( - "return $0;" + "while $0 {}" ), insert_text_format: Snippet, 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 @@ --- -created: "2019-01-23T05:27:32.314513+00:00" -creator: insta@0.4.0 +created: "2019-01-27T20:00:15.602646258+00:00" +creator: insta@0.5.2 expression: kind_completions source: crates/ra_ide_api/src/completion/completion_item.rs --- @@ -23,7 +23,7 @@ source: crates/ra_ide_api/src/completion/completion_item.rs }, CompletionItem { completion_kind: Keyword, - label: "match", + label: "loop", kind: Some( Keyword ), @@ -31,7 +31,7 @@ source: crates/ra_ide_api/src/completion/completion_item.rs documentation: None, lookup: None, insert_text: Some( - "match $0 {}" + "loop {$0}" ), insert_text_format: Snippet, source_range: [60; 60), @@ -39,7 +39,7 @@ source: crates/ra_ide_api/src/completion/completion_item.rs }, CompletionItem { completion_kind: Keyword, - label: "while", + label: "match", kind: Some( Keyword ), @@ -47,7 +47,7 @@ source: crates/ra_ide_api/src/completion/completion_item.rs documentation: None, lookup: None, insert_text: Some( - "while $0 {}" + "match $0 {}" ), insert_text_format: Snippet, source_range: [60; 60), @@ -55,7 +55,7 @@ source: crates/ra_ide_api/src/completion/completion_item.rs }, CompletionItem { completion_kind: Keyword, - label: "loop", + label: "return", kind: Some( Keyword ), @@ -63,7 +63,7 @@ source: crates/ra_ide_api/src/completion/completion_item.rs documentation: None, lookup: None, insert_text: Some( - "loop {$0}" + "return $0;" ), insert_text_format: Snippet, source_range: [60; 60), @@ -71,7 +71,7 @@ source: crates/ra_ide_api/src/completion/completion_item.rs }, CompletionItem { completion_kind: Keyword, - label: "return", + label: "while", kind: Some( Keyword ), @@ -79,7 +79,7 @@ source: crates/ra_ide_api/src/completion/completion_item.rs documentation: None, lookup: None, insert_text: Some( - "return $0;" + "while $0 {}" ), insert_text_format: Snippet, 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 @@ --- -created: "2019-01-23T05:27:32.197678+00:00" -creator: insta@0.4.0 +created: "2019-01-27T19:56:59.920190685+00:00" +creator: insta@0.5.2 expression: kind_completions source: crates/ra_ide_api/src/completion/completion_item.rs --- @@ -23,7 +23,7 @@ source: crates/ra_ide_api/src/completion/completion_item.rs }, CompletionItem { completion_kind: Keyword, - label: "match", + label: "loop", kind: Some( Keyword ), @@ -31,7 +31,7 @@ source: crates/ra_ide_api/src/completion/completion_item.rs documentation: None, lookup: None, insert_text: Some( - "match $0 {}" + "loop {$0}" ), insert_text_format: Snippet, source_range: [85; 85), @@ -39,7 +39,7 @@ source: crates/ra_ide_api/src/completion/completion_item.rs }, CompletionItem { completion_kind: Keyword, - label: "while", + label: "match", kind: Some( Keyword ), @@ -47,7 +47,7 @@ source: crates/ra_ide_api/src/completion/completion_item.rs documentation: None, lookup: None, insert_text: Some( - "while $0 {}" + "match $0 {}" ), insert_text_format: Snippet, source_range: [85; 85), @@ -55,7 +55,7 @@ source: crates/ra_ide_api/src/completion/completion_item.rs }, CompletionItem { completion_kind: Keyword, - label: "loop", + label: "return", kind: Some( Keyword ), @@ -63,7 +63,7 @@ source: crates/ra_ide_api/src/completion/completion_item.rs documentation: None, lookup: None, insert_text: Some( - "loop {$0}" + "return $0" ), insert_text_format: Snippet, source_range: [85; 85), @@ -71,7 +71,7 @@ source: crates/ra_ide_api/src/completion/completion_item.rs }, CompletionItem { completion_kind: Keyword, - label: "return", + label: "while", kind: Some( Keyword ), @@ -79,7 +79,7 @@ source: crates/ra_ide_api/src/completion/completion_item.rs documentation: None, lookup: None, insert_text: Some( - "return $0" + "while $0 {}" ), insert_text_format: Snippet, 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 @@ --- -created: "2019-01-22T15:38:19.788294+00:00" -creator: insta@0.4.0 +created: "2019-01-27T19:56:59.965130040+00:00" +creator: insta@0.5.2 expression: kind_completions -source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs" +source: crates/ra_ide_api/src/completion/completion_item.rs --- [ CompletionItem { completion_kind: Reference, - label: "main", + label: "frobnicate", kind: Some( Function ), detail: Some( - "fn main()" + "fn frobnicate()" ), documentation: None, lookup: None, @@ -23,12 +23,12 @@ source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs" }, CompletionItem { completion_kind: Reference, - label: "frobnicate", + label: "main", kind: Some( Function ), detail: Some( - "fn frobnicate()" + "fn main()" ), documentation: None, 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 @@ --- -created: "2019-01-25T16:44:04.640545300+00:00" +created: "2019-01-27T19:56:59.937030324+00:00" creator: insta@0.5.2 expression: kind_completions source: crates/ra_ide_api/src/completion/completion_item.rs @@ -7,16 +7,16 @@ source: crates/ra_ide_api/src/completion/completion_item.rs [ CompletionItem { completion_kind: Reference, - label: "Foo", + label: "Bar", kind: Some( EnumVariant ), detail: Some( - "()" + "(i32)" ), documentation: Some( Documentation( - "Foo Variant" + "Bar Variant with i32" ) ), lookup: None, @@ -27,16 +27,16 @@ source: crates/ra_ide_api/src/completion/completion_item.rs }, CompletionItem { completion_kind: Reference, - label: "Bar", + label: "Foo", kind: Some( EnumVariant ), detail: Some( - "(i32)" + "()" ), documentation: Some( Documentation( - "Bar Variant with i32" + "Foo Variant" ) ), 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 @@ --- -created: "2019-01-25T16:44:04.641542400+00:00" +created: "2019-01-27T19:56:59.938973454+00:00" creator: insta@0.5.2 expression: kind_completions source: crates/ra_ide_api/src/completion/completion_item.rs @@ -7,16 +7,16 @@ source: crates/ra_ide_api/src/completion/completion_item.rs [ CompletionItem { completion_kind: Reference, - label: "Foo", + label: "Bar", kind: Some( EnumVariant ), detail: Some( - "()" + "(i32, u32)" ), documentation: Some( Documentation( - "Foo Variant (empty)" + "Bar Variant with i32 and u32" ) ), lookup: None, @@ -27,16 +27,16 @@ source: crates/ra_ide_api/src/completion/completion_item.rs }, CompletionItem { completion_kind: Reference, - label: "Bar", + label: "Foo", kind: Some( EnumVariant ), detail: Some( - "(i32, u32)" + "()" ), documentation: Some( Documentation( - "Bar Variant with i32 and u32" + "Foo Variant (empty)" ) ), 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 @@ --- -created: "2019-01-22T14:45:00.817649800+00:00" -creator: insta@0.4.0 +created: "2019-01-27T19:56:59.944118550+00:00" +creator: insta@0.5.2 expression: kind_completions -source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs" +source: crates/ra_ide_api/src/completion/completion_item.rs --- [ CompletionItem { completion_kind: Postfix, - label: "not", + label: "if", kind: None, detail: None, documentation: None, lookup: None, insert_text: Some( - "!bar" + "if bar {$0}" ), insert_text_format: Snippet, source_range: [76; 76), @@ -30,13 +30,13 @@ source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs" }, CompletionItem { completion_kind: Postfix, - label: "if", + label: "match", kind: None, detail: None, documentation: None, lookup: None, insert_text: Some( - "if bar {$0}" + "match bar {\n${1:_} => {$0\\},\n}" ), insert_text_format: Snippet, source_range: [76; 76), @@ -53,13 +53,13 @@ source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs" }, CompletionItem { completion_kind: Postfix, - label: "match", + label: "not", kind: None, detail: None, documentation: None, lookup: None, insert_text: Some( - "match bar {\n${1:_} => {$0\\},\n}" + "!bar" ), insert_text_format: Snippet, 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 @@ --- -created: "2019-01-22T14:45:00.820642200+00:00" -creator: insta@0.4.0 +created: "2019-01-27T19:56:59.942831213+00:00" +creator: insta@0.5.2 expression: kind_completions -source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs" +source: crates/ra_ide_api/src/completion/completion_item.rs --- [ CompletionItem { completion_kind: Postfix, - label: "not", + label: "if", kind: None, detail: None, documentation: None, lookup: None, insert_text: Some( - "!bar" + "if bar {$0}" ), insert_text_format: Snippet, source_range: [76; 77), @@ -30,13 +30,13 @@ source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs" }, CompletionItem { completion_kind: Postfix, - label: "if", + label: "match", kind: None, detail: None, documentation: None, lookup: None, insert_text: Some( - "if bar {$0}" + "match bar {\n${1:_} => {$0\\},\n}" ), insert_text_format: Snippet, source_range: [76; 77), @@ -53,13 +53,13 @@ source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs" }, CompletionItem { completion_kind: Postfix, - label: "match", + label: "not", kind: None, detail: None, documentation: None, lookup: None, insert_text: Some( - "match bar {\n${1:_} => {$0\\},\n}" + "!bar" ), insert_text_format: Snippet, 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 @@ --- -created: "2019-01-23T05:27:32.222118+00:00" -creator: insta@0.4.0 +created: "2019-01-27T19:56:59.944615925+00:00" +creator: insta@0.5.2 expression: kind_completions source: crates/ra_ide_api/src/completion/completion_item.rs --- [ CompletionItem { completion_kind: Postfix, - label: "not", + label: "if", kind: None, detail: None, documentation: None, lookup: None, insert_text: Some( - "!bar" + "if bar {$0}" ), insert_text_format: Snippet, source_range: [78; 78), @@ -30,13 +30,13 @@ source: crates/ra_ide_api/src/completion/completion_item.rs }, CompletionItem { completion_kind: Postfix, - label: "if", + label: "match", kind: None, detail: None, documentation: None, lookup: None, insert_text: Some( - "if bar {$0}" + "match bar {\n${1:_} => {$0\\},\n}" ), insert_text_format: Snippet, source_range: [78; 78), @@ -53,13 +53,13 @@ source: crates/ra_ide_api/src/completion/completion_item.rs }, CompletionItem { completion_kind: Postfix, - label: "match", + label: "not", kind: None, detail: None, documentation: None, lookup: None, insert_text: Some( - "match bar {\n${1:_} => {$0\\},\n}" + "!bar" ), insert_text_format: Snippet, 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 @@ --- -created: "2019-01-22T15:38:19.919937+00:00" -creator: insta@0.4.0 +created: "2019-01-27T19:56:59.965550827+00:00" +creator: insta@0.5.2 expression: kind_completions -source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs" +source: crates/ra_ide_api/src/completion/completion_item.rs --- [ CompletionItem { completion_kind: Reference, - label: "no_args", + label: "main", kind: Some( Function ), detail: Some( - "fn no_args()" + "fn main()" ), documentation: None, lookup: None, insert_text: Some( - "no_args()$0" + "main()$0" ), insert_text_format: Snippet, source_range: [53; 56), @@ -25,17 +25,17 @@ source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs" }, CompletionItem { completion_kind: Reference, - label: "main", + label: "no_args", kind: Some( Function ), detail: Some( - "fn main()" + "fn no_args()" ), documentation: None, lookup: None, insert_text: Some( - "main()$0" + "no_args()$0" ), insert_text_format: Snippet, 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 @@ --- -created: "2019-01-23T05:27:32.197298+00:00" -creator: insta@0.4.0 +created: "2019-01-27T19:56:59.913826978+00:00" +creator: insta@0.5.2 expression: kind_completions source: crates/ra_ide_api/src/completion/completion_item.rs --- @@ -23,7 +23,7 @@ source: crates/ra_ide_api/src/completion/completion_item.rs }, CompletionItem { completion_kind: Keyword, - label: "match", + label: "loop", kind: Some( Keyword ), @@ -31,7 +31,7 @@ source: crates/ra_ide_api/src/completion/completion_item.rs documentation: None, lookup: None, insert_text: Some( - "match $0 {}" + "loop {$0}" ), insert_text_format: Snippet, source_range: [41; 41), @@ -39,7 +39,7 @@ source: crates/ra_ide_api/src/completion/completion_item.rs }, CompletionItem { completion_kind: Keyword, - label: "while", + label: "match", kind: Some( Keyword ), @@ -47,7 +47,7 @@ source: crates/ra_ide_api/src/completion/completion_item.rs documentation: None, lookup: None, insert_text: Some( - "while $0 {}" + "match $0 {}" ), insert_text_format: Snippet, source_range: [41; 41), @@ -55,7 +55,7 @@ source: crates/ra_ide_api/src/completion/completion_item.rs }, CompletionItem { completion_kind: Keyword, - label: "loop", + label: "return", kind: Some( Keyword ), @@ -63,7 +63,7 @@ source: crates/ra_ide_api/src/completion/completion_item.rs documentation: None, lookup: None, insert_text: Some( - "loop {$0}" + "return;" ), insert_text_format: Snippet, source_range: [41; 41), @@ -71,7 +71,7 @@ source: crates/ra_ide_api/src/completion/completion_item.rs }, CompletionItem { completion_kind: Keyword, - label: "return", + label: "while", kind: Some( Keyword ), @@ -79,7 +79,7 @@ source: crates/ra_ide_api/src/completion/completion_item.rs documentation: None, lookup: None, insert_text: Some( - "return;" + "while $0 {}" ), insert_text_format: Snippet, 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 @@ --- -created: "2019-01-23T05:27:32.197423+00:00" -creator: insta@0.4.0 +created: "2019-01-27T19:56:59.914744437+00:00" +creator: insta@0.5.2 expression: kind_completions source: crates/ra_ide_api/src/completion/completion_item.rs --- [ CompletionItem { completion_kind: Keyword, - label: "if", + label: "else", kind: Some( Keyword ), @@ -15,7 +15,7 @@ source: crates/ra_ide_api/src/completion/completion_item.rs documentation: None, lookup: None, insert_text: Some( - "if $0 {}" + "else {$0}" ), insert_text_format: Snippet, source_range: [92; 92), @@ -23,7 +23,7 @@ source: crates/ra_ide_api/src/completion/completion_item.rs }, CompletionItem { completion_kind: Keyword, - label: "match", + label: "else if", kind: Some( Keyword ), @@ -31,7 +31,7 @@ source: crates/ra_ide_api/src/completion/completion_item.rs documentation: None, lookup: None, insert_text: Some( - "match $0 {}" + "else if $0 {}" ), insert_text_format: Snippet, source_range: [92; 92), @@ -39,7 +39,7 @@ source: crates/ra_ide_api/src/completion/completion_item.rs }, CompletionItem { completion_kind: Keyword, - label: "while", + label: "if", kind: Some( Keyword ), @@ -47,7 +47,7 @@ source: crates/ra_ide_api/src/completion/completion_item.rs documentation: None, lookup: None, insert_text: Some( - "while $0 {}" + "if $0 {}" ), insert_text_format: Snippet, source_range: [92; 92), @@ -71,7 +71,7 @@ source: crates/ra_ide_api/src/completion/completion_item.rs }, CompletionItem { completion_kind: Keyword, - label: "else", + label: "match", kind: Some( Keyword ), @@ -79,7 +79,7 @@ source: crates/ra_ide_api/src/completion/completion_item.rs documentation: None, lookup: None, insert_text: Some( - "else {$0}" + "match $0 {}" ), insert_text_format: Snippet, source_range: [92; 92), @@ -87,7 +87,7 @@ source: crates/ra_ide_api/src/completion/completion_item.rs }, CompletionItem { completion_kind: Keyword, - label: "else if", + label: "return", kind: Some( Keyword ), @@ -95,7 +95,7 @@ source: crates/ra_ide_api/src/completion/completion_item.rs documentation: None, lookup: None, insert_text: Some( - "else if $0 {}" + "return;" ), insert_text_format: Snippet, source_range: [92; 92), @@ -103,7 +103,7 @@ source: crates/ra_ide_api/src/completion/completion_item.rs }, CompletionItem { completion_kind: Keyword, - label: "return", + label: "while", kind: Some( Keyword ), @@ -111,7 +111,7 @@ source: crates/ra_ide_api/src/completion/completion_item.rs documentation: None, lookup: None, insert_text: Some( - "return;" + "while $0 {}" ), insert_text_format: Snippet, 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 @@ --- -created: "2019-01-23T05:27:32.200056+00:00" -creator: insta@0.4.0 +created: "2019-01-27T19:56:59.927994050+00:00" +creator: insta@0.5.2 expression: kind_completions source: crates/ra_ide_api/src/completion/completion_item.rs --- @@ -23,7 +23,7 @@ source: crates/ra_ide_api/src/completion/completion_item.rs }, CompletionItem { completion_kind: Keyword, - label: "match", + label: "loop", kind: Some( Keyword ), @@ -31,7 +31,7 @@ source: crates/ra_ide_api/src/completion/completion_item.rs documentation: None, lookup: None, insert_text: Some( - "match $0 {}" + "loop {$0}" ), insert_text_format: Snippet, source_range: [48; 48), @@ -39,7 +39,7 @@ source: crates/ra_ide_api/src/completion/completion_item.rs }, CompletionItem { completion_kind: Keyword, - label: "while", + label: "match", kind: Some( Keyword ), @@ -47,7 +47,7 @@ source: crates/ra_ide_api/src/completion/completion_item.rs documentation: None, lookup: None, insert_text: Some( - "while $0 {}" + "match $0 {}" ), insert_text_format: Snippet, source_range: [48; 48), @@ -55,7 +55,7 @@ source: crates/ra_ide_api/src/completion/completion_item.rs }, CompletionItem { completion_kind: Keyword, - label: "loop", + label: "return", kind: Some( Keyword ), @@ -63,7 +63,7 @@ source: crates/ra_ide_api/src/completion/completion_item.rs documentation: None, lookup: None, insert_text: Some( - "loop {$0}" + "return $0;" ), insert_text_format: Snippet, source_range: [48; 48), @@ -71,7 +71,7 @@ source: crates/ra_ide_api/src/completion/completion_item.rs }, CompletionItem { completion_kind: Keyword, - label: "return", + label: "while", kind: Some( Keyword ), @@ -79,7 +79,7 @@ source: crates/ra_ide_api/src/completion/completion_item.rs documentation: None, lookup: None, insert_text: Some( - "return $0;" + "while $0 {}" ), insert_text_format: Snippet, 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 @@ --- -created: "2019-01-23T05:27:32.314468+00:00" -creator: insta@0.4.0 +created: "2019-01-27T20:00:15.604538211+00:00" +creator: insta@0.5.2 expression: kind_completions source: crates/ra_ide_api/src/completion/completion_item.rs --- @@ -23,7 +23,7 @@ source: crates/ra_ide_api/src/completion/completion_item.rs }, CompletionItem { completion_kind: Keyword, - label: "match", + label: "loop", kind: Some( Keyword ), @@ -31,7 +31,7 @@ source: crates/ra_ide_api/src/completion/completion_item.rs documentation: None, lookup: None, insert_text: Some( - "match $0 {}" + "loop {$0}" ), insert_text_format: Snippet, source_range: [41; 41), @@ -39,7 +39,7 @@ source: crates/ra_ide_api/src/completion/completion_item.rs }, CompletionItem { completion_kind: Keyword, - label: "while", + label: "match", kind: Some( Keyword ), @@ -47,7 +47,7 @@ source: crates/ra_ide_api/src/completion/completion_item.rs documentation: None, lookup: None, insert_text: Some( - "while $0 {}" + "match $0 {}" ), insert_text_format: Snippet, source_range: [41; 41), @@ -55,7 +55,7 @@ source: crates/ra_ide_api/src/completion/completion_item.rs }, CompletionItem { completion_kind: Keyword, - label: "loop", + label: "return", kind: Some( Keyword ), @@ -63,7 +63,7 @@ source: crates/ra_ide_api/src/completion/completion_item.rs documentation: None, lookup: None, insert_text: Some( - "loop {$0}" + "return;" ), insert_text_format: Snippet, source_range: [41; 41), @@ -71,7 +71,7 @@ source: crates/ra_ide_api/src/completion/completion_item.rs }, CompletionItem { completion_kind: Keyword, - label: "return", + label: "while", kind: Some( Keyword ), @@ -79,7 +79,7 @@ source: crates/ra_ide_api/src/completion/completion_item.rs documentation: None, lookup: None, insert_text: Some( - "return;" + "while $0 {}" ), insert_text_format: Snippet, 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 @@ --- -created: "2019-01-23T05:27:32.197624+00:00" -creator: insta@0.4.0 +created: "2019-01-27T19:56:59.918882346+00:00" +creator: insta@0.5.2 expression: kind_completions source: crates/ra_ide_api/src/completion/completion_item.rs --- @@ -23,7 +23,7 @@ source: crates/ra_ide_api/src/completion/completion_item.rs }, CompletionItem { completion_kind: Keyword, - label: "match", + label: "loop", kind: Some( Keyword ), @@ -31,7 +31,7 @@ source: crates/ra_ide_api/src/completion/completion_item.rs documentation: None, lookup: None, insert_text: Some( - "match $0 {}" + "loop {$0}" ), insert_text_format: Snippet, source_range: [83; 83), @@ -39,7 +39,7 @@ source: crates/ra_ide_api/src/completion/completion_item.rs }, CompletionItem { completion_kind: Keyword, - label: "while", + label: "match", kind: Some( Keyword ), @@ -47,7 +47,7 @@ source: crates/ra_ide_api/src/completion/completion_item.rs documentation: None, lookup: None, insert_text: Some( - "while $0 {}" + "match $0 {}" ), insert_text_format: Snippet, source_range: [83; 83), @@ -55,7 +55,7 @@ source: crates/ra_ide_api/src/completion/completion_item.rs }, CompletionItem { completion_kind: Keyword, - label: "loop", + label: "return", kind: Some( Keyword ), @@ -63,7 +63,7 @@ source: crates/ra_ide_api/src/completion/completion_item.rs documentation: None, lookup: None, insert_text: Some( - "loop {$0}" + "return $0;" ), insert_text_format: Snippet, source_range: [83; 83), @@ -71,7 +71,7 @@ source: crates/ra_ide_api/src/completion/completion_item.rs }, CompletionItem { completion_kind: Keyword, - label: "return", + label: "while", kind: Some( Keyword ), @@ -79,7 +79,7 @@ source: crates/ra_ide_api/src/completion/completion_item.rs documentation: None, lookup: None, insert_text: Some( - "return $0;" + "while $0 {}" ), insert_text_format: Snippet, 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 @@ --- -created: "2019-01-23T05:27:32.302452+00:00" -creator: insta@0.4.0 +created: "2019-01-27T20:00:15.604282112+00:00" +creator: insta@0.5.2 expression: kind_completions source: crates/ra_ide_api/src/completion/completion_item.rs --- @@ -23,7 +23,7 @@ source: crates/ra_ide_api/src/completion/completion_item.rs }, CompletionItem { completion_kind: Keyword, - label: "match", + label: "loop", kind: Some( Keyword ), @@ -31,7 +31,7 @@ source: crates/ra_ide_api/src/completion/completion_item.rs documentation: None, lookup: None, insert_text: Some( - "match $0 {}" + "loop {$0}" ), insert_text_format: Snippet, source_range: [83; 83), @@ -39,7 +39,7 @@ source: crates/ra_ide_api/src/completion/completion_item.rs }, CompletionItem { completion_kind: Keyword, - label: "while", + label: "match", kind: Some( Keyword ), @@ -47,7 +47,7 @@ source: crates/ra_ide_api/src/completion/completion_item.rs documentation: None, lookup: None, insert_text: Some( - "while $0 {}" + "match $0 {}" ), insert_text_format: Snippet, source_range: [83; 83), @@ -55,7 +55,7 @@ source: crates/ra_ide_api/src/completion/completion_item.rs }, CompletionItem { completion_kind: Keyword, - label: "loop", + label: "return", kind: Some( Keyword ), @@ -63,7 +63,7 @@ source: crates/ra_ide_api/src/completion/completion_item.rs documentation: None, lookup: None, insert_text: Some( - "loop {$0}" + "return $0;" ), insert_text_format: Snippet, source_range: [83; 83), @@ -71,7 +71,7 @@ source: crates/ra_ide_api/src/completion/completion_item.rs }, CompletionItem { completion_kind: Keyword, - label: "return", + label: "while", kind: Some( Keyword ), @@ -79,7 +79,7 @@ source: crates/ra_ide_api/src/completion/completion_item.rs documentation: None, lookup: None, insert_text: Some( - "return $0;" + "while $0 {}" ), insert_text_format: Snippet, 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 @@ --- -created: "2019-01-23T07:42:59.657718+00:00" -creator: insta@0.4.0 +created: "2019-01-27T19:56:59.953151082+00:00" +creator: insta@0.5.2 expression: kind_completions source: crates/ra_ide_api/src/completion/completion_item.rs --- [ CompletionItem { completion_kind: Reference, - label: "quux", + label: "Baz", kind: Some( - Function - ), - detail: Some( - "fn quux()" + Enum ), + detail: None, documentation: None, lookup: None, - insert_text: Some( - "quux()$0" - ), - insert_text_format: Snippet, + insert_text: None, + insert_text_format: PlainText, source_range: [89; 89), text_edit: None }, @@ -39,15 +35,19 @@ source: crates/ra_ide_api/src/completion/completion_item.rs }, CompletionItem { completion_kind: Reference, - label: "Baz", + label: "quux", kind: Some( - Enum + Function + ), + detail: Some( + "fn quux()" ), - detail: None, documentation: None, lookup: None, - insert_text: None, - insert_text_format: PlainText, + insert_text: Some( + "quux()$0" + ), + insert_text_format: Snippet, source_range: [89; 89), text_edit: None } 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 @@ --- -created: "2019-01-23T07:42:59.657837+00:00" -creator: insta@0.4.0 +created: "2019-01-27T19:56:59.959185284+00:00" +creator: insta@0.5.2 expression: kind_completions source: crates/ra_ide_api/src/completion/completion_item.rs --- [ CompletionItem { completion_kind: Reference, - label: "quux", + label: "Bar", kind: Some( - Function - ), - detail: Some( - "fn quux()" + Struct ), + detail: None, documentation: None, lookup: None, - insert_text: Some( - "quux()$0" - ), - insert_text_format: Snippet, + insert_text: None, + insert_text_format: PlainText, source_range: [101; 101), text_edit: None }, CompletionItem { completion_kind: Reference, - label: "Bar", + label: "quux", kind: Some( - Struct + Function + ), + detail: Some( + "fn quux()" ), - detail: None, documentation: None, lookup: None, - insert_text: None, - insert_text_format: PlainText, + insert_text: Some( + "quux()$0" + ), + insert_text_format: Snippet, source_range: [101; 101), text_edit: None } 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 @@ --- -created: "2019-01-22T14:45:00.651095300+00:00" -creator: insta@0.4.0 +created: "2019-01-27T19:56:59.922933445+00:00" +creator: insta@0.5.2 expression: kind_completions -source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs" +source: crates/ra_ide_api/src/completion/completion_item.rs --- [ CompletionItem { completion_kind: Keyword, - label: "if", + label: "break", kind: Some( Keyword ), @@ -15,7 +15,7 @@ source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs" documentation: None, lookup: None, insert_text: Some( - "if $0 {}" + "break" ), insert_text_format: Snippet, source_range: [106; 108), @@ -23,7 +23,7 @@ source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs" }, CompletionItem { completion_kind: Keyword, - label: "match", + label: "continue", kind: Some( Keyword ), @@ -31,7 +31,7 @@ source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs" documentation: None, lookup: None, insert_text: Some( - "match $0 {}" + "continue" ), insert_text_format: Snippet, source_range: [106; 108), @@ -39,7 +39,7 @@ source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs" }, CompletionItem { completion_kind: Keyword, - label: "while", + label: "if", kind: Some( Keyword ), @@ -47,7 +47,7 @@ source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs" documentation: None, lookup: None, insert_text: Some( - "while $0 {}" + "if $0 {}" ), insert_text_format: Snippet, source_range: [106; 108), @@ -71,7 +71,7 @@ source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs" }, CompletionItem { completion_kind: Keyword, - label: "continue", + label: "match", kind: Some( Keyword ), @@ -79,7 +79,7 @@ source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs" documentation: None, lookup: None, insert_text: Some( - "continue" + "match $0 {}" ), insert_text_format: Snippet, source_range: [106; 108), @@ -87,7 +87,7 @@ source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs" }, CompletionItem { completion_kind: Keyword, - label: "break", + label: "return", kind: Some( Keyword ), @@ -95,7 +95,7 @@ source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs" documentation: None, lookup: None, insert_text: Some( - "break" + "return" ), insert_text_format: Snippet, source_range: [106; 108), @@ -103,7 +103,7 @@ source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs" }, CompletionItem { completion_kind: Keyword, - label: "return", + label: "while", kind: Some( Keyword ), @@ -111,7 +111,7 @@ source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs" documentation: None, lookup: None, insert_text: Some( - "return" + "while $0 {}" ), insert_text_format: Snippet, 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 @@ --- -created: "2019-01-23T13:19:23.501353210+00:00" +created: "2019-01-27T19:56:59.910113268+00:00" creator: insta@0.5.2 expression: kind_completions source: crates/ra_ide_api/src/completion/completion_item.rs @@ -7,35 +7,35 @@ source: crates/ra_ide_api/src/completion/completion_item.rs [ CompletionItem { completion_kind: Reference, - label: "the_field", + label: "foo", kind: Some( - Field + Method ), detail: Some( - "(u32, i32)" + "fn foo(&self)" ), documentation: None, lookup: None, - insert_text: None, - insert_text_format: PlainText, + insert_text: Some( + "foo()$0" + ), + insert_text_format: Snippet, source_range: [126; 126), text_edit: None }, CompletionItem { completion_kind: Reference, - label: "foo", + label: "the_field", kind: Some( - Method + Field ), detail: Some( - "fn foo(&self)" + "(u32, i32)" ), documentation: None, lookup: None, - insert_text: Some( - "foo()$0" - ), - insert_text_format: Snippet, + insert_text: None, + insert_text_format: PlainText, source_range: [126; 126), text_edit: None } 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 @@ --- -created: "2019-01-25T19:27:09.519688600+00:00" +created: "2019-01-27T19:56:59.909689544+00:00" creator: insta@0.5.2 expression: kind_completions source: crates/ra_ide_api/src/completion/completion_item.rs @@ -7,39 +7,39 @@ source: crates/ra_ide_api/src/completion/completion_item.rs [ CompletionItem { completion_kind: Reference, - label: "the_field", + label: "foo", kind: Some( - Field + Method ), detail: Some( - "(u32,)" - ), - documentation: Some( - Documentation( - "This is the_field" - ) + "fn foo(self)" ), + documentation: None, lookup: None, - insert_text: None, - insert_text_format: PlainText, + insert_text: Some( + "foo()$0" + ), + insert_text_format: Snippet, source_range: [187; 187), text_edit: None }, CompletionItem { completion_kind: Reference, - label: "foo", + label: "the_field", kind: Some( - Method + Field ), detail: Some( - "fn foo(self)" + "(u32,)" ), - documentation: None, - lookup: None, - insert_text: Some( - "foo()$0" + documentation: Some( + Documentation( + "This is the_field" + ) ), - insert_text_format: Snippet, + lookup: None, + insert_text: None, + insert_text_format: PlainText, source_range: [187; 187), text_edit: None } -- cgit v1.2.3