From cf5c99271d79e98332d6e7d35f885b7c79177238 Mon Sep 17 00:00:00 2001 From: Florian Diebold Date: Sun, 27 Jan 2019 21:02:24 +0100 Subject: [PATCH] Sort completions in tests --- .../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 ++--- ...ompletes_break_and_continue_in_loops1.snap | 108 +++++++------- ...ompletes_break_and_continue_in_loops2.snap | 68 ++++----- ..._semi_after_return_if_not_a_statement.snap | 68 ++++----- ...ender_function_parens_if_already_call.snap | 38 ++--- .../completion_item__enum_variant.snap | 42 +++--- ...etion_item__enum_variant_with_details.snap | 42 +++--- ...tion_item__filter_postfix_completion1.snap | 52 +++---- ...tion_item__filter_postfix_completion2.snap | 52 +++---- ...tion_item__filter_postfix_completion3.snap | 50 +++---- ...m__inserts_parens_for_function_calls1.snap | 42 +++--- ...ompletion_item__keywords_in_function1.snap | 68 ++++----- ...ompletion_item__keywords_in_function2.snap | 132 +++++++++--------- ...ompletion_item__keywords_in_function3.snap | 68 ++++----- ...ompletion_item__keywords_in_function4.snap | 68 ++++----- ..._item__last_return_in_block_has_semi1.snap | 68 ++++----- ..._item__last_return_in_block_has_semi2.snap | 68 ++++----- .../completion_item__module_items.snap | 32 ++--- ..._item__module_items_in_nested_modules.snap | 32 ++--- ..._no_semi_after_break_continue_in_expr.snap | 110 +++++++-------- ...em__struct_field_completion_autoderef.snap | 34 ++--- ...on_item__struct_field_completion_self.snap | 38 ++--- 25 files changed, 678 insertions(+), 677 deletions(-) diff --git a/crates/ra_ide_api/src/completion/completion_item.rs b/crates/ra_ide_api/src/completion/completion_item.rs index b16ac2b289..49bd636a5d 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 329309c906..31df6565ba 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 dbbe06c7b4..9f37bae366 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 b727bb70cc..f4808bc939 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 8dcb773d02..25ccbdb8f8 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,55 +15,7 @@ source: crates/ra_ide_api/src/completion/completion_item.rs documentation: None, lookup: None, insert_text: Some( - "if $0 {}" - ), - insert_text_format: Snippet, - source_range: [55; 55), - text_edit: None - }, - CompletionItem { - completion_kind: Keyword, - label: "match", - kind: Some( - Keyword - ), - detail: None, - documentation: None, - lookup: None, - insert_text: Some( - "match $0 {}" - ), - insert_text_format: Snippet, - source_range: [55; 55), - text_edit: None - }, - CompletionItem { - completion_kind: Keyword, - label: "while", - kind: Some( - Keyword - ), - detail: None, - documentation: None, - lookup: None, - insert_text: Some( - "while $0 {}" - ), - insert_text_format: Snippet, - source_range: [55; 55), - text_edit: None - }, - CompletionItem { - completion_kind: Keyword, - label: "loop", - kind: Some( - Keyword - ), - detail: None, - documentation: None, - lookup: None, - insert_text: Some( - "loop {$0}" + "break;" ), insert_text_format: Snippet, source_range: [55; 55), @@ -87,7 +39,7 @@ source: crates/ra_ide_api/src/completion/completion_item.rs }, CompletionItem { completion_kind: Keyword, - label: "break", + label: "if", kind: Some( Keyword ), @@ -95,7 +47,39 @@ source: crates/ra_ide_api/src/completion/completion_item.rs documentation: None, lookup: None, insert_text: Some( - "break;" + "if $0 {}" + ), + insert_text_format: Snippet, + source_range: [55; 55), + text_edit: None + }, + CompletionItem { + completion_kind: Keyword, + label: "loop", + kind: Some( + Keyword + ), + detail: None, + documentation: None, + lookup: None, + insert_text: Some( + "loop {$0}" + ), + insert_text_format: Snippet, + source_range: [55; 55), + text_edit: None + }, + CompletionItem { + completion_kind: Keyword, + label: "match", + kind: Some( + Keyword + ), + detail: None, + documentation: None, + lookup: None, + insert_text: Some( + "match $0 {}" ), insert_text_format: Snippet, source_range: [55; 55), @@ -116,5 +100,21 @@ source: crates/ra_ide_api/src/completion/completion_item.rs insert_text_format: Snippet, source_range: [55; 55), text_edit: None + }, + CompletionItem { + completion_kind: Keyword, + label: "while", + kind: Some( + Keyword + ), + detail: None, + documentation: None, + lookup: None, + insert_text: Some( + "while $0 {}" + ), + insert_text_format: Snippet, + source_range: [55; 55), + text_edit: None } ] 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 1c64c65480..42a888e3a4 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 --- @@ -21,38 +21,6 @@ source: crates/ra_ide_api/src/completion/completion_item.rs source_range: [60; 60), text_edit: None }, - CompletionItem { - completion_kind: Keyword, - label: "match", - kind: Some( - Keyword - ), - detail: None, - documentation: None, - lookup: None, - insert_text: Some( - "match $0 {}" - ), - insert_text_format: Snippet, - source_range: [60; 60), - text_edit: None - }, - CompletionItem { - completion_kind: Keyword, - label: "while", - kind: Some( - Keyword - ), - detail: None, - documentation: None, - lookup: None, - insert_text: Some( - "while $0 {}" - ), - insert_text_format: Snippet, - source_range: [60; 60), - text_edit: None - }, CompletionItem { completion_kind: Keyword, label: "loop", @@ -69,6 +37,22 @@ source: crates/ra_ide_api/src/completion/completion_item.rs source_range: [60; 60), text_edit: None }, + CompletionItem { + completion_kind: Keyword, + label: "match", + kind: Some( + Keyword + ), + detail: None, + documentation: None, + lookup: None, + insert_text: Some( + "match $0 {}" + ), + insert_text_format: Snippet, + source_range: [60; 60), + text_edit: None + }, CompletionItem { completion_kind: Keyword, label: "return", @@ -84,5 +68,21 @@ source: crates/ra_ide_api/src/completion/completion_item.rs insert_text_format: Snippet, source_range: [60; 60), text_edit: None + }, + CompletionItem { + completion_kind: Keyword, + label: "while", + kind: Some( + Keyword + ), + detail: None, + documentation: None, + lookup: None, + insert_text: Some( + "while $0 {}" + ), + insert_text_format: Snippet, + source_range: [60; 60), + text_edit: None } ] 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 8c9657b5c0..5e4ff6af8c 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 --- @@ -21,38 +21,6 @@ source: crates/ra_ide_api/src/completion/completion_item.rs source_range: [85; 85), text_edit: None }, - CompletionItem { - completion_kind: Keyword, - label: "match", - kind: Some( - Keyword - ), - detail: None, - documentation: None, - lookup: None, - insert_text: Some( - "match $0 {}" - ), - insert_text_format: Snippet, - source_range: [85; 85), - text_edit: None - }, - CompletionItem { - completion_kind: Keyword, - label: "while", - kind: Some( - Keyword - ), - detail: None, - documentation: None, - lookup: None, - insert_text: Some( - "while $0 {}" - ), - insert_text_format: Snippet, - source_range: [85; 85), - text_edit: None - }, CompletionItem { completion_kind: Keyword, label: "loop", @@ -69,6 +37,22 @@ source: crates/ra_ide_api/src/completion/completion_item.rs source_range: [85; 85), text_edit: None }, + CompletionItem { + completion_kind: Keyword, + label: "match", + kind: Some( + Keyword + ), + detail: None, + documentation: None, + lookup: None, + insert_text: Some( + "match $0 {}" + ), + insert_text_format: Snippet, + source_range: [85; 85), + text_edit: None + }, CompletionItem { completion_kind: Keyword, label: "return", @@ -84,5 +68,21 @@ source: crates/ra_ide_api/src/completion/completion_item.rs insert_text_format: Snippet, source_range: [85; 85), text_edit: None + }, + CompletionItem { + completion_kind: Keyword, + label: "while", + kind: Some( + Keyword + ), + detail: None, + documentation: None, + lookup: None, + insert_text: Some( + "while $0 {}" + ), + insert_text_format: Snippet, + source_range: [85; 85), + text_edit: None } ] 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 091bf581e3..f4a04ecb3c 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,26 +1,10 @@ --- -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", - kind: Some( - Function - ), - detail: Some( - "fn main()" - ), - documentation: None, - lookup: None, - insert_text: None, - insert_text_format: PlainText, - source_range: [35; 39), - text_edit: None - }, CompletionItem { completion_kind: Reference, label: "frobnicate", @@ -36,5 +20,21 @@ source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs" insert_text_format: PlainText, source_range: [35; 39), text_edit: None + }, + CompletionItem { + completion_kind: Reference, + label: "main", + kind: Some( + Function + ), + detail: Some( + "fn main()" + ), + documentation: None, + lookup: None, + insert_text: None, + insert_text_format: PlainText, + source_range: [35; 39), + text_edit: 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 8c84439b29..8ac58006e2 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,30 +1,10 @@ --- -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 --- [ - CompletionItem { - completion_kind: Reference, - label: "Foo", - kind: Some( - EnumVariant - ), - detail: Some( - "()" - ), - documentation: Some( - Documentation( - "Foo Variant" - ) - ), - lookup: None, - insert_text: None, - insert_text_format: PlainText, - source_range: [116; 116), - text_edit: None - }, CompletionItem { completion_kind: Reference, label: "Bar", @@ -44,5 +24,25 @@ source: crates/ra_ide_api/src/completion/completion_item.rs insert_text_format: PlainText, source_range: [116; 116), text_edit: None + }, + CompletionItem { + completion_kind: Reference, + label: "Foo", + kind: Some( + EnumVariant + ), + detail: Some( + "()" + ), + documentation: Some( + Documentation( + "Foo Variant" + ) + ), + lookup: None, + insert_text: None, + insert_text_format: PlainText, + source_range: [116; 116), + text_edit: 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 3846345171..9fd2d81ec8 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,30 +1,10 @@ --- -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 --- [ - CompletionItem { - completion_kind: Reference, - label: "Foo", - kind: Some( - EnumVariant - ), - detail: Some( - "()" - ), - documentation: Some( - Documentation( - "Foo Variant (empty)" - ) - ), - lookup: None, - insert_text: None, - insert_text_format: PlainText, - source_range: [180; 180), - text_edit: None - }, CompletionItem { completion_kind: Reference, label: "Bar", @@ -45,6 +25,26 @@ source: crates/ra_ide_api/src/completion/completion_item.rs source_range: [180; 180), text_edit: None }, + CompletionItem { + completion_kind: Reference, + label: "Foo", + kind: Some( + EnumVariant + ), + detail: Some( + "()" + ), + documentation: Some( + Documentation( + "Foo Variant (empty)" + ) + ), + lookup: None, + insert_text: None, + insert_text_format: PlainText, + source_range: [180; 180), + text_edit: None + }, CompletionItem { completion_kind: Reference, label: "S", 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 13f9154469..6b2287951d 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,33 +1,10 @@ --- -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", - kind: None, - detail: None, - documentation: None, - lookup: None, - insert_text: Some( - "!bar" - ), - insert_text_format: Snippet, - source_range: [76; 76), - text_edit: Some( - TextEdit { - atoms: [ - AtomTextEdit { - delete: [72; 76), - insert: "" - } - ] - } - ) - }, CompletionItem { completion_kind: Postfix, label: "if", @@ -74,6 +51,29 @@ source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs" } ) }, + CompletionItem { + completion_kind: Postfix, + label: "not", + kind: None, + detail: None, + documentation: None, + lookup: None, + insert_text: Some( + "!bar" + ), + insert_text_format: Snippet, + source_range: [76; 76), + text_edit: Some( + TextEdit { + atoms: [ + AtomTextEdit { + delete: [72; 76), + insert: "" + } + ] + } + ) + }, CompletionItem { completion_kind: Postfix, label: "while", 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 fff87574d5..6925fd1021 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,33 +1,10 @@ --- -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", - kind: None, - detail: None, - documentation: None, - lookup: None, - insert_text: Some( - "!bar" - ), - insert_text_format: Snippet, - source_range: [76; 77), - text_edit: Some( - TextEdit { - atoms: [ - AtomTextEdit { - delete: [72; 76), - insert: "" - } - ] - } - ) - }, CompletionItem { completion_kind: Postfix, label: "if", @@ -74,6 +51,29 @@ source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs" } ) }, + CompletionItem { + completion_kind: Postfix, + label: "not", + kind: None, + detail: None, + documentation: None, + lookup: None, + insert_text: Some( + "!bar" + ), + insert_text_format: Snippet, + source_range: [76; 77), + text_edit: Some( + TextEdit { + atoms: [ + AtomTextEdit { + delete: [72; 76), + insert: "" + } + ] + } + ) + }, CompletionItem { completion_kind: Postfix, label: "while", 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 e0f4730e78..22eaf2b4fd 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,33 +1,10 @@ --- -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", - kind: None, - detail: None, - documentation: None, - lookup: None, - insert_text: Some( - "!bar" - ), - insert_text_format: Snippet, - source_range: [78; 78), - text_edit: Some( - TextEdit { - atoms: [ - AtomTextEdit { - delete: [72; 78), - insert: "" - } - ] - } - ) - }, CompletionItem { completion_kind: Postfix, label: "if", @@ -74,6 +51,29 @@ source: crates/ra_ide_api/src/completion/completion_item.rs } ) }, + CompletionItem { + completion_kind: Postfix, + label: "not", + kind: None, + detail: None, + documentation: None, + lookup: None, + insert_text: Some( + "!bar" + ), + insert_text_format: Snippet, + source_range: [78; 78), + text_edit: Some( + TextEdit { + atoms: [ + AtomTextEdit { + delete: [72; 78), + insert: "" + } + ] + } + ) + }, CompletionItem { completion_kind: Postfix, label: "while", 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 b30a4c9e96..339df3c84c 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,28 +1,10 @@ --- -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", - kind: Some( - Function - ), - detail: Some( - "fn no_args()" - ), - documentation: None, - lookup: None, - insert_text: Some( - "no_args()$0" - ), - insert_text_format: Snippet, - source_range: [53; 56), - text_edit: None - }, CompletionItem { completion_kind: Reference, label: "main", @@ -40,5 +22,23 @@ source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs" insert_text_format: Snippet, source_range: [53; 56), text_edit: None + }, + CompletionItem { + completion_kind: Reference, + label: "no_args", + kind: Some( + Function + ), + detail: Some( + "fn no_args()" + ), + documentation: None, + lookup: None, + insert_text: Some( + "no_args()$0" + ), + insert_text_format: Snippet, + source_range: [53; 56), + text_edit: None } ] 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 2b61825784..874c41a02f 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 --- @@ -21,38 +21,6 @@ source: crates/ra_ide_api/src/completion/completion_item.rs source_range: [41; 41), text_edit: None }, - CompletionItem { - completion_kind: Keyword, - label: "match", - kind: Some( - Keyword - ), - detail: None, - documentation: None, - lookup: None, - insert_text: Some( - "match $0 {}" - ), - insert_text_format: Snippet, - source_range: [41; 41), - text_edit: None - }, - CompletionItem { - completion_kind: Keyword, - label: "while", - kind: Some( - Keyword - ), - detail: None, - documentation: None, - lookup: None, - insert_text: Some( - "while $0 {}" - ), - insert_text_format: Snippet, - source_range: [41; 41), - text_edit: None - }, CompletionItem { completion_kind: Keyword, label: "loop", @@ -69,6 +37,22 @@ source: crates/ra_ide_api/src/completion/completion_item.rs source_range: [41; 41), text_edit: None }, + CompletionItem { + completion_kind: Keyword, + label: "match", + kind: Some( + Keyword + ), + detail: None, + documentation: None, + lookup: None, + insert_text: Some( + "match $0 {}" + ), + insert_text_format: Snippet, + source_range: [41; 41), + text_edit: None + }, CompletionItem { completion_kind: Keyword, label: "return", @@ -84,5 +68,21 @@ source: crates/ra_ide_api/src/completion/completion_item.rs insert_text_format: Snippet, source_range: [41; 41), text_edit: None + }, + CompletionItem { + completion_kind: Keyword, + label: "while", + kind: Some( + Keyword + ), + detail: None, + documentation: None, + lookup: None, + insert_text: Some( + "while $0 {}" + ), + insert_text_format: Snippet, + source_range: [41; 41), + text_edit: None } ] 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 a56105f0c8..0eec578bee 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,74 +1,10 @@ --- -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", - kind: Some( - Keyword - ), - detail: None, - documentation: None, - lookup: None, - insert_text: Some( - "if $0 {}" - ), - insert_text_format: Snippet, - source_range: [92; 92), - text_edit: None - }, - CompletionItem { - completion_kind: Keyword, - label: "match", - kind: Some( - Keyword - ), - detail: None, - documentation: None, - lookup: None, - insert_text: Some( - "match $0 {}" - ), - insert_text_format: Snippet, - source_range: [92; 92), - text_edit: None - }, - CompletionItem { - completion_kind: Keyword, - label: "while", - kind: Some( - Keyword - ), - detail: None, - documentation: None, - lookup: None, - insert_text: Some( - "while $0 {}" - ), - insert_text_format: Snippet, - source_range: [92; 92), - text_edit: None - }, - CompletionItem { - completion_kind: Keyword, - label: "loop", - kind: Some( - Keyword - ), - detail: None, - documentation: None, - lookup: None, - insert_text: Some( - "loop {$0}" - ), - insert_text_format: Snippet, - source_range: [92; 92), - text_edit: None - }, CompletionItem { completion_kind: Keyword, label: "else", @@ -101,6 +37,54 @@ source: crates/ra_ide_api/src/completion/completion_item.rs source_range: [92; 92), text_edit: None }, + CompletionItem { + completion_kind: Keyword, + label: "if", + kind: Some( + Keyword + ), + detail: None, + documentation: None, + lookup: None, + insert_text: Some( + "if $0 {}" + ), + insert_text_format: Snippet, + source_range: [92; 92), + text_edit: None + }, + CompletionItem { + completion_kind: Keyword, + label: "loop", + kind: Some( + Keyword + ), + detail: None, + documentation: None, + lookup: None, + insert_text: Some( + "loop {$0}" + ), + insert_text_format: Snippet, + source_range: [92; 92), + text_edit: None + }, + CompletionItem { + completion_kind: Keyword, + label: "match", + kind: Some( + Keyword + ), + detail: None, + documentation: None, + lookup: None, + insert_text: Some( + "match $0 {}" + ), + insert_text_format: Snippet, + source_range: [92; 92), + text_edit: None + }, CompletionItem { completion_kind: Keyword, label: "return", @@ -116,5 +100,21 @@ source: crates/ra_ide_api/src/completion/completion_item.rs insert_text_format: Snippet, source_range: [92; 92), text_edit: None + }, + CompletionItem { + completion_kind: Keyword, + label: "while", + kind: Some( + Keyword + ), + detail: None, + documentation: None, + lookup: None, + insert_text: Some( + "while $0 {}" + ), + insert_text_format: Snippet, + source_range: [92; 92), + text_edit: None } ] 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 84efab6f6a..4b99f15e1f 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 --- @@ -21,38 +21,6 @@ source: crates/ra_ide_api/src/completion/completion_item.rs source_range: [48; 48), text_edit: None }, - CompletionItem { - completion_kind: Keyword, - label: "match", - kind: Some( - Keyword - ), - detail: None, - documentation: None, - lookup: None, - insert_text: Some( - "match $0 {}" - ), - insert_text_format: Snippet, - source_range: [48; 48), - text_edit: None - }, - CompletionItem { - completion_kind: Keyword, - label: "while", - kind: Some( - Keyword - ), - detail: None, - documentation: None, - lookup: None, - insert_text: Some( - "while $0 {}" - ), - insert_text_format: Snippet, - source_range: [48; 48), - text_edit: None - }, CompletionItem { completion_kind: Keyword, label: "loop", @@ -69,6 +37,22 @@ source: crates/ra_ide_api/src/completion/completion_item.rs source_range: [48; 48), text_edit: None }, + CompletionItem { + completion_kind: Keyword, + label: "match", + kind: Some( + Keyword + ), + detail: None, + documentation: None, + lookup: None, + insert_text: Some( + "match $0 {}" + ), + insert_text_format: Snippet, + source_range: [48; 48), + text_edit: None + }, CompletionItem { completion_kind: Keyword, label: "return", @@ -84,5 +68,21 @@ source: crates/ra_ide_api/src/completion/completion_item.rs insert_text_format: Snippet, source_range: [48; 48), text_edit: None + }, + CompletionItem { + completion_kind: Keyword, + label: "while", + kind: Some( + Keyword + ), + detail: None, + documentation: None, + lookup: None, + insert_text: Some( + "while $0 {}" + ), + insert_text_format: Snippet, + source_range: [48; 48), + text_edit: None } ] 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 8b254ce99a..f8587f1472 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 --- @@ -21,38 +21,6 @@ source: crates/ra_ide_api/src/completion/completion_item.rs source_range: [41; 41), text_edit: None }, - CompletionItem { - completion_kind: Keyword, - label: "match", - kind: Some( - Keyword - ), - detail: None, - documentation: None, - lookup: None, - insert_text: Some( - "match $0 {}" - ), - insert_text_format: Snippet, - source_range: [41; 41), - text_edit: None - }, - CompletionItem { - completion_kind: Keyword, - label: "while", - kind: Some( - Keyword - ), - detail: None, - documentation: None, - lookup: None, - insert_text: Some( - "while $0 {}" - ), - insert_text_format: Snippet, - source_range: [41; 41), - text_edit: None - }, CompletionItem { completion_kind: Keyword, label: "loop", @@ -69,6 +37,22 @@ source: crates/ra_ide_api/src/completion/completion_item.rs source_range: [41; 41), text_edit: None }, + CompletionItem { + completion_kind: Keyword, + label: "match", + kind: Some( + Keyword + ), + detail: None, + documentation: None, + lookup: None, + insert_text: Some( + "match $0 {}" + ), + insert_text_format: Snippet, + source_range: [41; 41), + text_edit: None + }, CompletionItem { completion_kind: Keyword, label: "return", @@ -84,5 +68,21 @@ source: crates/ra_ide_api/src/completion/completion_item.rs insert_text_format: Snippet, source_range: [41; 41), text_edit: None + }, + CompletionItem { + completion_kind: Keyword, + label: "while", + kind: Some( + Keyword + ), + detail: None, + documentation: None, + lookup: None, + insert_text: Some( + "while $0 {}" + ), + insert_text_format: Snippet, + source_range: [41; 41), + text_edit: None } ] 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 d36b555db5..3c27e079f2 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 --- @@ -21,38 +21,6 @@ source: crates/ra_ide_api/src/completion/completion_item.rs source_range: [83; 83), text_edit: None }, - CompletionItem { - completion_kind: Keyword, - label: "match", - kind: Some( - Keyword - ), - detail: None, - documentation: None, - lookup: None, - insert_text: Some( - "match $0 {}" - ), - insert_text_format: Snippet, - source_range: [83; 83), - text_edit: None - }, - CompletionItem { - completion_kind: Keyword, - label: "while", - kind: Some( - Keyword - ), - detail: None, - documentation: None, - lookup: None, - insert_text: Some( - "while $0 {}" - ), - insert_text_format: Snippet, - source_range: [83; 83), - text_edit: None - }, CompletionItem { completion_kind: Keyword, label: "loop", @@ -69,6 +37,22 @@ source: crates/ra_ide_api/src/completion/completion_item.rs source_range: [83; 83), text_edit: None }, + CompletionItem { + completion_kind: Keyword, + label: "match", + kind: Some( + Keyword + ), + detail: None, + documentation: None, + lookup: None, + insert_text: Some( + "match $0 {}" + ), + insert_text_format: Snippet, + source_range: [83; 83), + text_edit: None + }, CompletionItem { completion_kind: Keyword, label: "return", @@ -84,5 +68,21 @@ source: crates/ra_ide_api/src/completion/completion_item.rs insert_text_format: Snippet, source_range: [83; 83), text_edit: None + }, + CompletionItem { + completion_kind: Keyword, + label: "while", + kind: Some( + Keyword + ), + detail: None, + documentation: None, + lookup: None, + insert_text: Some( + "while $0 {}" + ), + insert_text_format: Snippet, + source_range: [83; 83), + text_edit: None } ] 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 d74483c0bd..d1be8c6e73 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 --- @@ -21,38 +21,6 @@ source: crates/ra_ide_api/src/completion/completion_item.rs source_range: [83; 83), text_edit: None }, - CompletionItem { - completion_kind: Keyword, - label: "match", - kind: Some( - Keyword - ), - detail: None, - documentation: None, - lookup: None, - insert_text: Some( - "match $0 {}" - ), - insert_text_format: Snippet, - source_range: [83; 83), - text_edit: None - }, - CompletionItem { - completion_kind: Keyword, - label: "while", - kind: Some( - Keyword - ), - detail: None, - documentation: None, - lookup: None, - insert_text: Some( - "while $0 {}" - ), - insert_text_format: Snippet, - source_range: [83; 83), - text_edit: None - }, CompletionItem { completion_kind: Keyword, label: "loop", @@ -69,6 +37,22 @@ source: crates/ra_ide_api/src/completion/completion_item.rs source_range: [83; 83), text_edit: None }, + CompletionItem { + completion_kind: Keyword, + label: "match", + kind: Some( + Keyword + ), + detail: None, + documentation: None, + lookup: None, + insert_text: Some( + "match $0 {}" + ), + insert_text_format: Snippet, + source_range: [83; 83), + text_edit: None + }, CompletionItem { completion_kind: Keyword, label: "return", @@ -84,5 +68,21 @@ source: crates/ra_ide_api/src/completion/completion_item.rs insert_text_format: Snippet, source_range: [83; 83), text_edit: None + }, + CompletionItem { + completion_kind: Keyword, + label: "while", + kind: Some( + Keyword + ), + detail: None, + documentation: None, + lookup: None, + insert_text: Some( + "while $0 {}" + ), + insert_text_format: Snippet, + source_range: [83; 83), + text_edit: None } ] 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 a87880ab33..f6bba49ae2 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 f95d109263..7c458664e0 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,10 +1,24 @@ --- -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: "Bar", + kind: Some( + Struct + ), + detail: None, + documentation: None, + lookup: None, + insert_text: None, + insert_text_format: PlainText, + source_range: [101; 101), + text_edit: None + }, CompletionItem { completion_kind: Reference, label: "quux", @@ -22,19 +36,5 @@ source: crates/ra_ide_api/src/completion/completion_item.rs insert_text_format: Snippet, source_range: [101; 101), text_edit: None - }, - CompletionItem { - completion_kind: Reference, - label: "Bar", - kind: Some( - Struct - ), - detail: None, - documentation: None, - lookup: None, - insert_text: None, - insert_text_format: PlainText, - 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 a5164b03ea..5a35d9ca9d 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,55 +15,7 @@ source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs" documentation: None, lookup: None, insert_text: Some( - "if $0 {}" - ), - insert_text_format: Snippet, - source_range: [106; 108), - text_edit: None - }, - CompletionItem { - completion_kind: Keyword, - label: "match", - kind: Some( - Keyword - ), - detail: None, - documentation: None, - lookup: None, - insert_text: Some( - "match $0 {}" - ), - insert_text_format: Snippet, - source_range: [106; 108), - text_edit: None - }, - CompletionItem { - completion_kind: Keyword, - label: "while", - kind: Some( - Keyword - ), - detail: None, - documentation: None, - lookup: None, - insert_text: Some( - "while $0 {}" - ), - insert_text_format: Snippet, - source_range: [106; 108), - text_edit: None - }, - CompletionItem { - completion_kind: Keyword, - label: "loop", - kind: Some( - Keyword - ), - detail: None, - documentation: None, - lookup: None, - insert_text: Some( - "loop {$0}" + "break" ), insert_text_format: Snippet, source_range: [106; 108), @@ -87,7 +39,7 @@ source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs" }, CompletionItem { completion_kind: Keyword, - label: "break", + label: "if", kind: Some( Keyword ), @@ -95,7 +47,39 @@ source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs" documentation: None, lookup: None, insert_text: Some( - "break" + "if $0 {}" + ), + insert_text_format: Snippet, + source_range: [106; 108), + text_edit: None + }, + CompletionItem { + completion_kind: Keyword, + label: "loop", + kind: Some( + Keyword + ), + detail: None, + documentation: None, + lookup: None, + insert_text: Some( + "loop {$0}" + ), + insert_text_format: Snippet, + source_range: [106; 108), + text_edit: None + }, + CompletionItem { + completion_kind: Keyword, + label: "match", + kind: Some( + Keyword + ), + detail: None, + documentation: None, + lookup: None, + insert_text: Some( + "match $0 {}" ), insert_text_format: Snippet, source_range: [106; 108), @@ -116,5 +100,21 @@ source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs" insert_text_format: Snippet, source_range: [106; 108), text_edit: None + }, + CompletionItem { + completion_kind: Keyword, + label: "while", + kind: Some( + Keyword + ), + detail: None, + documentation: None, + lookup: None, + insert_text: Some( + "while $0 {}" + ), + insert_text_format: Snippet, + source_range: [106; 108), + text_edit: None } ] 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 5f5df00332..4d5c7a8690 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,26 +1,10 @@ --- -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 --- [ - CompletionItem { - completion_kind: Reference, - label: "the_field", - kind: Some( - Field - ), - detail: Some( - "(u32, i32)" - ), - documentation: None, - lookup: None, - insert_text: None, - insert_text_format: PlainText, - source_range: [126; 126), - text_edit: None - }, CompletionItem { completion_kind: Reference, label: "foo", @@ -38,5 +22,21 @@ source: crates/ra_ide_api/src/completion/completion_item.rs insert_text_format: Snippet, source_range: [126; 126), text_edit: None + }, + CompletionItem { + completion_kind: Reference, + label: "the_field", + kind: Some( + Field + ), + detail: Some( + "(u32, i32)" + ), + documentation: None, + lookup: None, + 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 580e92a905..1073d90fd1 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,10 +1,28 @@ --- -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 --- [ + CompletionItem { + completion_kind: Reference, + label: "foo", + kind: Some( + Method + ), + detail: Some( + "fn foo(self)" + ), + documentation: None, + lookup: None, + insert_text: Some( + "foo()$0" + ), + insert_text_format: Snippet, + source_range: [187; 187), + text_edit: None + }, CompletionItem { completion_kind: Reference, label: "the_field", @@ -24,23 +42,5 @@ source: crates/ra_ide_api/src/completion/completion_item.rs insert_text_format: PlainText, source_range: [187; 187), text_edit: None - }, - CompletionItem { - completion_kind: Reference, - label: "foo", - kind: Some( - Method - ), - detail: Some( - "fn foo(self)" - ), - documentation: None, - lookup: None, - insert_text: Some( - "foo()$0" - ), - insert_text_format: Snippet, - source_range: [187; 187), - text_edit: None } ]