From 53ae63835da570c3419712141b34180ff9aae95c Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Fri, 24 May 2019 01:46:23 +0300 Subject: :arrow_up: rustc --- crates/ra_ide_api/src/completion/complete_dot.rs | 252 +++++++++++---------- .../ra_ide_api/src/completion/complete_fn_param.rs | 60 ++--- .../ra_ide_api/src/completion/complete_pattern.rs | 62 ++--- .../src/completion/complete_struct_literal.rs | 22 +- .../completion_item__bindings_from_for.snap | 10 +- .../completion_item__bindings_from_if_let.snap | 12 +- .../completion_item__bindings_from_let.snap | 12 +- ...em__completes_break_and_continue_in_loops1.snap | 20 +- ...em__completes_break_and_continue_in_loops2.snap | 16 +- .../completion_item__completes_prelude.snap | 12 +- ...on_item__completes_use_paths_across_crates.snap | 8 +- .../completion_item__deeply_nested_use_tree.snap | 8 +- ...t_add_semi_after_return_if_not_a_statement.snap | 16 +- ...ont_render_function_parens_if_already_call.snap | 10 +- ...r_function_parens_if_already_call_assoc_fn.snap | 8 +- ...m__dont_render_function_parens_in_use_item.snap | 8 +- ...__dont_show_both_completions_for_shadowing.snap | 10 +- .../snapshots/completion_item__enum_variant.snap | 14 +- ...completion_item__enum_variant_with_details.snap | 18 +- .../snapshots/completion_item__extern_prelude.snap | 8 +- .../snapshots/completion_item__generic_params.snap | 10 +- .../completion_item__generic_params_in_struct.snap | 10 +- ...n_item__inserts_parens_for_function_calls1.snap | 10 +- ...n_item__inserts_parens_for_function_calls2.snap | 10 +- ...n_item__inserts_parens_for_function_calls3.snap | 8 +- .../completion_item__keywords_in_function1.snap | 16 +- .../completion_item__keywords_in_function2.snap | 20 +- .../completion_item__keywords_in_function3.snap | 16 +- .../completion_item__keywords_in_function4.snap | 16 +- .../completion_item__keywords_in_use_stmt1.snap | 12 +- .../completion_item__keywords_in_use_stmt2.snap | 10 +- .../completion_item__keywords_in_use_stmt3.snap | 10 +- ...etion_item__last_return_in_block_has_semi1.snap | 16 +- ...etion_item__last_return_in_block_has_semi2.snap | 16 +- .../snapshots/completion_item__mod_with_docs.snap | 10 +- .../snapshots/completion_item__module_items.snap | 12 +- ...etion_item__module_items_in_nested_modules.snap | 10 +- .../completion_item__nested_use_tree.snap | 10 +- ...item__no_semi_after_break_continue_in_expr.snap | 20 +- ...mpletion_works_for_trivial_path_expression.snap | 20 +- .../snapshots/completion_item__return_type.snap | 10 +- .../completion_item__self_in_methods.snap | 10 +- .../completion_item__snippets_in_expressions.snap | 10 +- .../completion_item__snippets_in_items.snap | 10 +- .../completion_item__struct_associated_const.snap | 10 +- .../completion_item__struct_associated_method.snap | 10 +- .../completion_item__struct_associated_type.snap | 10 +- ...pletion_item__use_item_starting_with_crate.snap | 10 +- ...mpletion_item__use_item_starting_with_self.snap | 8 +- crates/ra_ide_api/src/diagnostics.rs | 46 ++-- .../display/snapshots/tests__file_structure.snap | 68 +++--- .../src/snapshots/tests__highlighting.snap | 74 +++--- .../src/snapshots/tests__rename_mod.snap | 30 +-- .../src/snapshots/tests__rename_mod_in_dir.snap | 30 +-- .../ra_ide_api/src/snapshots/tests__runnables.snap | 18 +- .../src/snapshots/tests__runnables_module.snap | 16 +- .../tests__runnables_multiple_depth_module.snap | 16 +- .../tests__runnables_one_depth_layer_module.snap | 16 +- 58 files changed, 640 insertions(+), 610 deletions(-) (limited to 'crates') diff --git a/crates/ra_ide_api/src/completion/complete_dot.rs b/crates/ra_ide_api/src/completion/complete_dot.rs index 2e8084699..5bf289c63 100644 --- a/crates/ra_ide_api/src/completion/complete_dot.rs +++ b/crates/ra_ide_api/src/completion/complete_dot.rs @@ -66,16 +66,18 @@ mod tests { } ", ), - @r###"[ - CompletionItem { - label: "the_field", - source_range: [94; 94), - delete: [94; 94), - insert: "the_field", - kind: Field, - detail: "u32" - } -]"### + @r###" + ⋮[ + ⋮ CompletionItem { + ⋮ label: "the_field", + ⋮ source_range: [94; 94), + ⋮ delete: [94; 94), + ⋮ insert: "the_field", + ⋮ kind: Field, + ⋮ detail: "u32", + ⋮ }, + ⋮] + "### ); } @@ -95,27 +97,29 @@ mod tests { } ", ), - @r###"[ - CompletionItem { - label: "foo", - source_range: [187; 187), - delete: [187; 187), - insert: "foo()$0", - kind: Method, - detail: "fn foo(self)" - }, - CompletionItem { - label: "the_field", - source_range: [187; 187), - delete: [187; 187), - insert: "the_field", - kind: Field, - detail: "(u32,)", - documentation: Documentation( - "This is the_field" - ) - } -]"### + @r###" + ⋮[ + ⋮ CompletionItem { + ⋮ label: "foo", + ⋮ source_range: [187; 187), + ⋮ delete: [187; 187), + ⋮ insert: "foo()$0", + ⋮ kind: Method, + ⋮ detail: "fn foo(self)", + ⋮ }, + ⋮ CompletionItem { + ⋮ label: "the_field", + ⋮ source_range: [187; 187), + ⋮ delete: [187; 187), + ⋮ insert: "the_field", + ⋮ kind: Field, + ⋮ detail: "(u32,)", + ⋮ documentation: Documentation( + ⋮ "This is the_field", + ⋮ ), + ⋮ }, + ⋮] + "### ); } @@ -132,24 +136,26 @@ mod tests { } ", ), - @r###"[ - CompletionItem { - label: "foo", - source_range: [126; 126), - delete: [126; 126), - insert: "foo()$0", - kind: Method, - detail: "fn foo(&self)" - }, - CompletionItem { - label: "the_field", - source_range: [126; 126), - delete: [126; 126), - insert: "the_field", - kind: Field, - detail: "(u32, i32)" - } -]"### + @r###" + ⋮[ + ⋮ CompletionItem { + ⋮ label: "foo", + ⋮ source_range: [126; 126), + ⋮ delete: [126; 126), + ⋮ insert: "foo()$0", + ⋮ kind: Method, + ⋮ detail: "fn foo(&self)", + ⋮ }, + ⋮ CompletionItem { + ⋮ label: "the_field", + ⋮ source_range: [126; 126), + ⋮ delete: [126; 126), + ⋮ insert: "the_field", + ⋮ kind: Field, + ⋮ detail: "(u32, i32)", + ⋮ }, + ⋮] + "### ); } @@ -182,16 +188,18 @@ mod tests { } ", ), - @r###"[ - CompletionItem { - label: "the_method", - source_range: [144; 144), - delete: [144; 144), - insert: "the_method()$0", - kind: Method, - detail: "fn the_method(&self)" - } -]"### + @r###" + ⋮[ + ⋮ CompletionItem { + ⋮ label: "the_method", + ⋮ source_range: [144; 144), + ⋮ delete: [144; 144), + ⋮ insert: "the_method()$0", + ⋮ kind: Method, + ⋮ detail: "fn the_method(&self)", + ⋮ }, + ⋮] + "### ); } @@ -208,16 +216,18 @@ mod tests { } ", ), - @r###"[ - CompletionItem { - label: "the_method", - source_range: [151; 151), - delete: [151; 151), - insert: "the_method()$0", - kind: Method, - detail: "fn the_method(&self)" - } -]"### + @r###" + ⋮[ + ⋮ CompletionItem { + ⋮ label: "the_method", + ⋮ source_range: [151; 151), + ⋮ delete: [151; 151), + ⋮ insert: "the_method()$0", + ⋮ kind: Method, + ⋮ detail: "fn the_method(&self)", + ⋮ }, + ⋮] + "### ); } @@ -257,16 +267,18 @@ mod tests { } ", ), - @r###"[ - CompletionItem { - label: "the_method", - source_range: [249; 249), - delete: [249; 249), - insert: "the_method()$0", - kind: Method, - detail: "fn the_method(&self)" - } -]"### + @r###" + ⋮[ + ⋮ CompletionItem { + ⋮ label: "the_method", + ⋮ source_range: [249; 249), + ⋮ delete: [249; 249), + ⋮ insert: "the_method()$0", + ⋮ kind: Method, + ⋮ detail: "fn the_method(&self)", + ⋮ }, + ⋮] + "### ); } @@ -281,24 +293,26 @@ mod tests { } ", ), - @r###"[ - CompletionItem { - label: "0", - source_range: [75; 75), - delete: [75; 75), - insert: "0", - kind: Field, - detail: "i32" - }, - CompletionItem { - label: "1", - source_range: [75; 75), - delete: [75; 75), - insert: "1", - kind: Field, - detail: "f64" - } -]"### + @r###" + ⋮[ + ⋮ CompletionItem { + ⋮ label: "0", + ⋮ source_range: [75; 75), + ⋮ delete: [75; 75), + ⋮ insert: "0", + ⋮ kind: Field, + ⋮ detail: "i32", + ⋮ }, + ⋮ CompletionItem { + ⋮ label: "1", + ⋮ source_range: [75; 75), + ⋮ delete: [75; 75), + ⋮ insert: "1", + ⋮ kind: Field, + ⋮ detail: "f64", + ⋮ }, + ⋮] + "### ); } @@ -322,16 +336,18 @@ mod tests { } ", ), - @r###"[ - CompletionItem { - label: "blah", - source_range: [299; 300), - delete: [299; 300), - insert: "blah()$0", - kind: Method, - detail: "pub fn blah(&self)" - } -]"### + @r###" + ⋮[ + ⋮ CompletionItem { + ⋮ label: "blah", + ⋮ source_range: [299; 300), + ⋮ delete: [299; 300), + ⋮ insert: "blah()$0", + ⋮ kind: Method, + ⋮ detail: "pub fn blah(&self)", + ⋮ }, + ⋮] + "### ); } @@ -346,16 +362,18 @@ mod tests { }; ", ), - @r###"[ - CompletionItem { - label: "the_field", - source_range: [106; 106), - delete: [106; 106), - insert: "the_field", - kind: Field, - detail: "u32" - } -]"### + @r###" + ⋮[ + ⋮ CompletionItem { + ⋮ label: "the_field", + ⋮ source_range: [106; 106), + ⋮ delete: [106; 106), + ⋮ insert: "the_field", + ⋮ kind: Field, + ⋮ detail: "u32", + ⋮ }, + ⋮] + "### ); } } diff --git a/crates/ra_ide_api/src/completion/complete_fn_param.rs b/crates/ra_ide_api/src/completion/complete_fn_param.rs index 85ef62f52..d738ffc13 100644 --- a/crates/ra_ide_api/src/completion/complete_fn_param.rs +++ b/crates/ra_ide_api/src/completion/complete_fn_param.rs @@ -71,15 +71,17 @@ mod tests { fn baz(file<|>) {} ", ), - @r###"[ - CompletionItem { - label: "file_id: FileId", - source_range: [110; 114), - delete: [110; 114), - insert: "file_id: FileId", - lookup: "file_id" - } -]"### + @r###" + ⋮[ + ⋮ CompletionItem { + ⋮ label: "file_id: FileId", + ⋮ source_range: [110; 114), + ⋮ delete: [110; 114), + ⋮ insert: "file_id: FileId", + ⋮ lookup: "file_id", + ⋮ }, + ⋮] + "### ); } @@ -93,15 +95,17 @@ mod tests { fn baz(file<|>, x: i32) {} ", ), - @r###"[ - CompletionItem { - label: "file_id: FileId", - source_range: [110; 114), - delete: [110; 114), - insert: "file_id: FileId", - lookup: "file_id" - } -]"### + @r###" + ⋮[ + ⋮ CompletionItem { + ⋮ label: "file_id: FileId", + ⋮ source_range: [110; 114), + ⋮ delete: [110; 114), + ⋮ insert: "file_id: FileId", + ⋮ lookup: "file_id", + ⋮ }, + ⋮] + "### ); } @@ -118,15 +122,17 @@ mod tests { } ", ), - @r###"[ - CompletionItem { - label: "file_id: FileId", - source_range: [289; 293), - delete: [289; 293), - insert: "file_id: FileId", - lookup: "file_id" - } -]"### + @r###" + ⋮[ + ⋮ CompletionItem { + ⋮ label: "file_id: FileId", + ⋮ source_range: [289; 293), + ⋮ delete: [289; 293), + ⋮ insert: "file_id: FileId", + ⋮ lookup: "file_id", + ⋮ }, + ⋮] + "### ); } } diff --git a/crates/ra_ide_api/src/completion/complete_pattern.rs b/crates/ra_ide_api/src/completion/complete_pattern.rs index 0ef248687..74833a756 100644 --- a/crates/ra_ide_api/src/completion/complete_pattern.rs +++ b/crates/ra_ide_api/src/completion/complete_pattern.rs @@ -53,35 +53,37 @@ mod tests { } ", ); - assert_debug_snapshot_matches!(completions, @r###"[ - CompletionItem { - label: "E", - source_range: [246; 246), - delete: [246; 246), - insert: "E", - kind: Enum - }, - CompletionItem { - label: "X", - source_range: [246; 246), - delete: [246; 246), - insert: "X", - kind: EnumVariant - }, - CompletionItem { - label: "Z", - source_range: [246; 246), - delete: [246; 246), - insert: "Z", - kind: Const - }, - CompletionItem { - label: "m", - source_range: [246; 246), - delete: [246; 246), - insert: "m", - kind: Module - } -]"###); + assert_debug_snapshot_matches!(completions, @r###" + ⋮[ + ⋮ CompletionItem { + ⋮ label: "E", + ⋮ source_range: [246; 246), + ⋮ delete: [246; 246), + ⋮ insert: "E", + ⋮ kind: Enum, + ⋮ }, + ⋮ CompletionItem { + ⋮ label: "X", + ⋮ source_range: [246; 246), + ⋮ delete: [246; 246), + ⋮ insert: "X", + ⋮ kind: EnumVariant, + ⋮ }, + ⋮ CompletionItem { + ⋮ label: "Z", + ⋮ source_range: [246; 246), + ⋮ delete: [246; 246), + ⋮ insert: "Z", + ⋮ kind: Const, + ⋮ }, + ⋮ CompletionItem { + ⋮ label: "m", + ⋮ source_range: [246; 246), + ⋮ delete: [246; 246), + ⋮ insert: "m", + ⋮ kind: Module, + ⋮ }, + ⋮] + "###); } } diff --git a/crates/ra_ide_api/src/completion/complete_struct_literal.rs b/crates/ra_ide_api/src/completion/complete_struct_literal.rs index a00c1b60b..1eeea58f6 100644 --- a/crates/ra_ide_api/src/completion/complete_struct_literal.rs +++ b/crates/ra_ide_api/src/completion/complete_struct_literal.rs @@ -44,15 +44,17 @@ mod tests { } ", ); - assert_debug_snapshot_matches!(completions, @r###"[ - CompletionItem { - label: "the_field", - source_range: [83; 86), - delete: [83; 86), - insert: "the_field", - kind: Field, - detail: "u32" - } -]"###); + assert_debug_snapshot_matches!(completions, @r###" + ⋮[ + ⋮ CompletionItem { + ⋮ label: "the_field", + ⋮ source_range: [83; 86), + ⋮ delete: [83; 86), + ⋮ insert: "the_field", + ⋮ kind: Field, + ⋮ detail: "u32", + ⋮ }, + ⋮] + "###); } } 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 bd7f99f71..e9b717a45 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,6 +1,6 @@ --- -created: "2019-02-18T09:22:24.132341107Z" -creator: insta@0.6.2 +created: "2019-05-23T22:23:35.119822026Z" +creator: insta@0.8.1 source: crates/ra_ide_api/src/completion/completion_item.rs expression: kind_completions --- @@ -11,13 +11,13 @@ expression: kind_completions delete: [83; 83), insert: "quux()$0", kind: Function, - detail: "fn quux()" + detail: "fn quux()", }, CompletionItem { label: "x", source_range: [83; 83), delete: [83; 83), insert: "x", - kind: Binding - } + kind: Binding, + }, ] 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 3b374c4de..2a22201ad 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,6 +1,6 @@ --- -created: "2019-02-18T09:22:24.126809445Z" -creator: insta@0.6.2 +created: "2019-05-23T22:23:35.122168608Z" +creator: insta@0.8.1 source: crates/ra_ide_api/src/completion/completion_item.rs expression: kind_completions --- @@ -10,14 +10,14 @@ expression: kind_completions source_range: [214; 214), delete: [214; 214), insert: "a", - kind: Binding + kind: Binding, }, CompletionItem { label: "b", source_range: [214; 214), delete: [214; 214), insert: "b", - kind: Binding + kind: Binding, }, CompletionItem { label: "quux", @@ -25,6 +25,6 @@ expression: kind_completions delete: [214; 214), insert: "quux()$0", kind: Function, - detail: "fn quux()" - } + detail: "fn quux()", + }, ] 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 173f5319a..b9a5dc9c8 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,6 +1,6 @@ --- -created: "2019-02-18T09:22:24.126696322Z" -creator: insta@0.6.2 +created: "2019-05-23T22:23:35.122797188Z" +creator: insta@0.8.1 source: crates/ra_ide_api/src/completion/completion_item.rs expression: kind_completions --- @@ -11,20 +11,20 @@ expression: kind_completions delete: [79; 79), insert: "quux($0)", kind: Function, - detail: "fn quux(x: i32)" + detail: "fn quux(x: i32)", }, CompletionItem { label: "x", source_range: [79; 79), delete: [79; 79), insert: "x", - kind: Binding + kind: Binding, }, CompletionItem { label: "y", source_range: [79; 79), delete: [79; 79), insert: "y", - kind: Binding - } + kind: Binding, + }, ] 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 42ff02469..b6f95c1ff 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,6 +1,6 @@ --- -created: "2019-02-18T09:22:23.976673150Z" -creator: insta@0.6.2 +created: "2019-05-23T22:23:35.067956470Z" +creator: insta@0.8.1 source: crates/ra_ide_api/src/completion/completion_item.rs expression: kind_completions --- @@ -10,48 +10,48 @@ expression: kind_completions source_range: [55; 55), delete: [55; 55), insert: "break;", - kind: Keyword + kind: Keyword, }, CompletionItem { label: "continue", source_range: [55; 55), delete: [55; 55), insert: "continue;", - kind: Keyword + kind: Keyword, }, CompletionItem { label: "if", source_range: [55; 55), delete: [55; 55), insert: "if $0 {}", - kind: Keyword + kind: Keyword, }, CompletionItem { label: "loop", source_range: [55; 55), delete: [55; 55), insert: "loop {$0}", - kind: Keyword + kind: Keyword, }, CompletionItem { label: "match", source_range: [55; 55), delete: [55; 55), insert: "match $0 {}", - kind: Keyword + kind: Keyword, }, CompletionItem { label: "return", source_range: [55; 55), delete: [55; 55), insert: "return $0;", - kind: Keyword + kind: Keyword, }, CompletionItem { label: "while", source_range: [55; 55), delete: [55; 55), insert: "while $0 {}", - kind: Keyword - } + kind: Keyword, + }, ] 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 057ff8a7a..9b37478ef 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-02-18T09:22:24.068967569Z" -creator: insta@0.6.2 +created: "2019-05-23T22:44:10.859967190Z" +creator: insta@0.8.1 source: crates/ra_ide_api/src/completion/completion_item.rs expression: kind_completions --- @@ -10,34 +10,34 @@ expression: kind_completions source_range: [60; 60), delete: [60; 60), insert: "if $0 {}", - kind: Keyword + kind: Keyword, }, CompletionItem { label: "loop", source_range: [60; 60), delete: [60; 60), insert: "loop {$0}", - kind: Keyword + kind: Keyword, }, CompletionItem { label: "match", source_range: [60; 60), delete: [60; 60), insert: "match $0 {}", - kind: Keyword + kind: Keyword, }, CompletionItem { label: "return", source_range: [60; 60), delete: [60; 60), insert: "return $0;", - kind: Keyword + kind: Keyword, }, CompletionItem { label: "while", source_range: [60; 60), delete: [60; 60), insert: "while $0 {}", - kind: Keyword - } + kind: Keyword, + }, ] diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__completes_prelude.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__completes_prelude.snap index 16126ee77..b339c6c5f 100644 --- a/crates/ra_ide_api/src/completion/snapshots/completion_item__completes_prelude.snap +++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__completes_prelude.snap @@ -1,6 +1,6 @@ --- -created: "2019-02-18T09:22:24.180517434Z" -creator: insta@0.6.2 +created: "2019-05-23T22:23:35.139262926Z" +creator: insta@0.8.1 source: crates/ra_ide_api/src/completion/completion_item.rs expression: kind_completions --- @@ -10,7 +10,7 @@ expression: kind_completions source_range: [18; 18), delete: [18; 18), insert: "Option", - kind: Struct + kind: Struct, }, CompletionItem { label: "foo", @@ -18,13 +18,13 @@ expression: kind_completions delete: [18; 18), insert: "foo()$0", kind: Function, - detail: "fn foo()" + detail: "fn foo()", }, CompletionItem { label: "std", source_range: [18; 18), delete: [18; 18), insert: "std", - kind: Module - } + kind: Module, + }, ] diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__completes_use_paths_across_crates.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__completes_use_paths_across_crates.snap index 2420e7744..113deafb1 100644 --- a/crates/ra_ide_api/src/completion/snapshots/completion_item__completes_use_paths_across_crates.snap +++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__completes_use_paths_across_crates.snap @@ -1,6 +1,6 @@ --- -created: "2019-02-18T09:22:24.118807216Z" -creator: insta@0.6.2 +created: "2019-05-23T22:23:35.108690807Z" +creator: insta@0.8.1 source: crates/ra_ide_api/src/completion/completion_item.rs expression: kind_completions --- @@ -10,6 +10,6 @@ expression: kind_completions source_range: [9; 9), delete: [9; 9), insert: "bar", - kind: Module - } + kind: Module, + }, ] diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__deeply_nested_use_tree.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__deeply_nested_use_tree.snap index c472f7965..aacdeb763 100644 --- a/crates/ra_ide_api/src/completion/snapshots/completion_item__deeply_nested_use_tree.snap +++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__deeply_nested_use_tree.snap @@ -1,6 +1,6 @@ --- -created: "2019-02-18T09:22:24.044567777Z" -creator: insta@0.6.2 +created: "2019-05-23T22:23:35.085633034Z" +creator: insta@0.8.1 source: crates/ra_ide_api/src/completion/completion_item.rs expression: kind_completions --- @@ -10,6 +10,6 @@ expression: kind_completions source_range: [23; 25), delete: [23; 25), insert: "Spam", - kind: Struct - } + kind: Struct, + }, ] 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 97bd76c49..9d320c715 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-02-18T09:22:23.987788705Z" -creator: insta@0.6.2 +created: "2019-05-23T22:23:35.081993214Z" +creator: insta@0.8.1 source: crates/ra_ide_api/src/completion/completion_item.rs expression: kind_completions --- @@ -10,34 +10,34 @@ expression: kind_completions source_range: [85; 85), delete: [85; 85), insert: "if $0 {}", - kind: Keyword + kind: Keyword, }, CompletionItem { label: "loop", source_range: [85; 85), delete: [85; 85), insert: "loop {$0}", - kind: Keyword + kind: Keyword, }, CompletionItem { label: "match", source_range: [85; 85), delete: [85; 85), insert: "match $0 {}", - kind: Keyword + kind: Keyword, }, CompletionItem { label: "return", source_range: [85; 85), delete: [85; 85), insert: "return $0", - kind: Keyword + kind: Keyword, }, CompletionItem { label: "while", source_range: [85; 85), delete: [85; 85), insert: "while $0 {}", - kind: Keyword - } + kind: Keyword, + }, ] 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 1de0efb5b..46bea2ccd 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,6 +1,6 @@ --- -created: "2019-02-18T09:22:24.211680376Z" -creator: insta@0.6.2 +created: "2019-05-23T22:23:35.158296242Z" +creator: insta@0.8.1 source: crates/ra_ide_api/src/completion/completion_item.rs expression: kind_completions --- @@ -11,7 +11,7 @@ expression: kind_completions delete: [35; 39), insert: "frobnicate", kind: Function, - detail: "fn frobnicate()" + detail: "fn frobnicate()", }, CompletionItem { label: "main", @@ -19,6 +19,6 @@ expression: kind_completions delete: [35; 39), insert: "main", kind: Function, - detail: "fn main()" - } + detail: "fn main()", + }, ] diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__dont_render_function_parens_if_already_call_assoc_fn.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__dont_render_function_parens_if_already_call_assoc_fn.snap index 19375ea95..b09a6745e 100644 --- a/crates/ra_ide_api/src/completion/snapshots/completion_item__dont_render_function_parens_if_already_call_assoc_fn.snap +++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__dont_render_function_parens_if_already_call_assoc_fn.snap @@ -1,6 +1,6 @@ --- -created: "2019-02-24T16:33:48.008220694Z" -creator: insta@0.6.3 +created: "2019-05-23T22:44:10.920136527Z" +creator: insta@0.8.1 source: crates/ra_ide_api/src/completion/completion_item.rs expression: kind_completions --- @@ -11,6 +11,6 @@ expression: kind_completions delete: [67; 69), insert: "new", kind: Function, - detail: "fn new() -> Foo" - } + detail: "fn new() -> Foo", + }, ] diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__dont_render_function_parens_in_use_item.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__dont_render_function_parens_in_use_item.snap index ef77816ec..84ccc8160 100644 --- a/crates/ra_ide_api/src/completion/snapshots/completion_item__dont_render_function_parens_in_use_item.snap +++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__dont_render_function_parens_in_use_item.snap @@ -1,6 +1,6 @@ --- -created: "2019-02-18T09:22:24.213677341Z" -creator: insta@0.6.2 +created: "2019-05-23T22:23:35.154795561Z" +creator: insta@0.8.1 source: crates/ra_ide_api/src/completion/completion_item.rs expression: kind_completions --- @@ -11,6 +11,6 @@ expression: kind_completions delete: [40; 41), insert: "foo", kind: Function, - detail: "pub fn foo()" - } + detail: "pub fn foo()", + }, ] diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__dont_show_both_completions_for_shadowing.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__dont_show_both_completions_for_shadowing.snap index 34adcda6c..57434210d 100644 --- a/crates/ra_ide_api/src/completion/snapshots/completion_item__dont_show_both_completions_for_shadowing.snap +++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__dont_show_both_completions_for_shadowing.snap @@ -1,6 +1,6 @@ --- -created: "2019-04-04T14:52:24.531844100Z" -creator: insta@0.7.4 +created: "2019-05-23T22:23:35.142044205Z" +creator: insta@0.8.1 source: crates/ra_ide_api/src/completion/completion_item.rs expression: kind_completions --- @@ -10,7 +10,7 @@ expression: kind_completions source_range: [126; 126), delete: [126; 126), insert: "bar", - kind: Binding + kind: Binding, }, CompletionItem { label: "foo", @@ -18,6 +18,6 @@ expression: kind_completions delete: [126; 126), insert: "foo()$0", kind: Function, - detail: "fn foo()" - } + detail: "fn foo()", + }, ] 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 1df121523..e40217ca8 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,6 +1,6 @@ --- -created: "2019-02-18T09:22:24.045355450Z" -creator: insta@0.6.2 +created: "2019-05-23T22:23:35.090178265Z" +creator: insta@0.8.1 source: crates/ra_ide_api/src/completion/completion_item.rs expression: kind_completions --- @@ -13,8 +13,8 @@ expression: kind_completions kind: EnumVariant, detail: "(i32)", documentation: Documentation( - "Bar Variant with i32" - ) + "Bar Variant with i32", + ), }, CompletionItem { label: "Foo", @@ -24,7 +24,7 @@ expression: kind_completions kind: EnumVariant, detail: "()", documentation: Documentation( - "Foo Variant" - ) - } + "Foo Variant", + ), + }, ] 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 daccd9fba..e09d7988a 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,6 +1,6 @@ --- -created: "2019-04-02T07:43:12.954637543Z" -creator: insta@0.7.4 +created: "2019-05-23T22:23:35.091325331Z" +creator: insta@0.8.1 source: crates/ra_ide_api/src/completion/completion_item.rs expression: kind_completions --- @@ -13,8 +13,8 @@ expression: kind_completions kind: EnumVariant, detail: "(i32, u32)", documentation: Documentation( - "Bar Variant with i32 and u32" - ) + "Bar Variant with i32 and u32", + ), }, CompletionItem { label: "Foo", @@ -24,8 +24,8 @@ expression: kind_completions kind: EnumVariant, detail: "()", documentation: Documentation( - "Foo Variant (empty)" - ) + "Foo Variant (empty)", + ), }, CompletionItem { label: "S", @@ -35,7 +35,7 @@ expression: kind_completions kind: EnumVariant, detail: "(S)", documentation: Documentation( - "" - ) - } + "", + ), + }, ] diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__extern_prelude.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__extern_prelude.snap index 0d36fd603..b9449a76c 100644 --- a/crates/ra_ide_api/src/completion/snapshots/completion_item__extern_prelude.snap +++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__extern_prelude.snap @@ -1,6 +1,6 @@ --- -created: "2019-02-18T09:22:24.137183638Z" -creator: insta@0.6.2 +created: "2019-05-23T22:23:35.123197049Z" +creator: insta@0.8.1 source: crates/ra_ide_api/src/completion/completion_item.rs expression: kind_completions --- @@ -10,6 +10,6 @@ expression: kind_completions source_range: [4; 4), delete: [4; 4), insert: "other_crate", - kind: Module - } + kind: Module, + }, ] diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__generic_params.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__generic_params.snap index 210e5a02d..eb1a4151a 100644 --- a/crates/ra_ide_api/src/completion/snapshots/completion_item__generic_params.snap +++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__generic_params.snap @@ -1,6 +1,6 @@ --- -created: "2019-02-18T09:22:24.143253235Z" -creator: insta@0.6.2 +created: "2019-05-23T22:23:35.123825399Z" +creator: insta@0.8.1 source: crates/ra_ide_api/src/completion/completion_item.rs expression: kind_completions --- @@ -10,7 +10,7 @@ expression: kind_completions source_range: [44; 44), delete: [44; 44), insert: "T", - kind: TypeParam + kind: TypeParam, }, CompletionItem { label: "quux", @@ -18,6 +18,6 @@ expression: kind_completions delete: [44; 44), insert: "quux()$0", kind: Function, - detail: "fn quux()" - } + detail: "fn quux()", + }, ] diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__generic_params_in_struct.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__generic_params_in_struct.snap index ab8c30446..52f08267f 100644 --- a/crates/ra_ide_api/src/completion/snapshots/completion_item__generic_params_in_struct.snap +++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__generic_params_in_struct.snap @@ -1,6 +1,6 @@ --- -created: "2019-02-18T09:22:24.149424158Z" -creator: insta@0.6.2 +created: "2019-05-23T22:23:35.130778739Z" +creator: insta@0.8.1 source: crates/ra_ide_api/src/completion/completion_item.rs expression: kind_completions --- @@ -10,13 +10,13 @@ expression: kind_completions source_range: [46; 46), delete: [46; 46), insert: "T", - kind: TypeParam + kind: TypeParam, }, CompletionItem { label: "X", source_range: [46; 46), delete: [46; 46), insert: "X", - kind: Struct - } + kind: Struct, + }, ] 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 a4fc447b2..c795b9aae 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,6 +1,6 @@ --- -created: "2019-02-18T09:22:24.224510370Z" -creator: insta@0.6.2 +created: "2019-05-23T22:23:35.156115632Z" +creator: insta@0.8.1 source: crates/ra_ide_api/src/completion/completion_item.rs expression: kind_completions --- @@ -11,7 +11,7 @@ expression: kind_completions delete: [53; 56), insert: "main()$0", kind: Function, - detail: "fn main()" + detail: "fn main()", }, CompletionItem { label: "no_args", @@ -19,6 +19,6 @@ expression: kind_completions delete: [53; 56), insert: "no_args()$0", kind: Function, - detail: "fn no_args()" - } + detail: "fn no_args()", + }, ] diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__inserts_parens_for_function_calls2.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__inserts_parens_for_function_calls2.snap index b124355d5..b49a838e0 100644 --- a/crates/ra_ide_api/src/completion/snapshots/completion_item__inserts_parens_for_function_calls2.snap +++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__inserts_parens_for_function_calls2.snap @@ -1,6 +1,6 @@ --- -created: "2019-02-18T09:22:24.267013140Z" -creator: insta@0.6.2 +created: "2019-05-23T22:44:10.916806744Z" +creator: insta@0.8.1 source: crates/ra_ide_api/src/completion/completion_item.rs expression: kind_completions --- @@ -11,7 +11,7 @@ expression: kind_completions delete: [72; 77), insert: "main()$0", kind: Function, - detail: "fn main()" + detail: "fn main()", }, CompletionItem { label: "with_args", @@ -19,6 +19,6 @@ expression: kind_completions delete: [72; 77), insert: "with_args($0)", kind: Function, - detail: "fn with_args(x: i32, y: String)" - } + detail: "fn with_args(x: i32, y: String)", + }, ] diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__inserts_parens_for_function_calls3.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__inserts_parens_for_function_calls3.snap index fec729d48..b62cb7aa1 100644 --- a/crates/ra_ide_api/src/completion/snapshots/completion_item__inserts_parens_for_function_calls3.snap +++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__inserts_parens_for_function_calls3.snap @@ -1,6 +1,6 @@ --- -created: "2019-02-18T09:22:24.303360770Z" -creator: insta@0.6.2 +created: "2019-05-23T22:44:40.543731193Z" +creator: insta@0.8.1 source: crates/ra_ide_api/src/completion/completion_item.rs expression: kind_completions --- @@ -11,6 +11,6 @@ expression: kind_completions delete: [139; 140), insert: "foo()$0", kind: Method, - detail: "fn foo(&self)" - } + detail: "fn foo(&self)", + }, ] 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 045e2a4e6..34a44bb70 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-02-18T09:22:23.987788720Z" -creator: insta@0.6.2 +created: "2019-05-23T22:23:35.075690846Z" +creator: insta@0.8.1 source: crates/ra_ide_api/src/completion/completion_item.rs expression: kind_completions --- @@ -10,34 +10,34 @@ expression: kind_completions source_range: [41; 41), delete: [41; 41), insert: "if $0 {}", - kind: Keyword + kind: Keyword, }, CompletionItem { label: "loop", source_range: [41; 41), delete: [41; 41), insert: "loop {$0}", - kind: Keyword + kind: Keyword, }, CompletionItem { label: "match", source_range: [41; 41), delete: [41; 41), insert: "match $0 {}", - kind: Keyword + kind: Keyword, }, CompletionItem { label: "return", source_range: [41; 41), delete: [41; 41), insert: "return;", - kind: Keyword + kind: Keyword, }, CompletionItem { label: "while", source_range: [41; 41), delete: [41; 41), insert: "while $0 {}", - kind: Keyword - } + kind: Keyword, + }, ] 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 b08efa522..ac744f362 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,6 +1,6 @@ --- -created: "2019-02-18T09:22:23.984740354Z" -creator: insta@0.6.2 +created: "2019-05-23T22:23:35.068799431Z" +creator: insta@0.8.1 source: crates/ra_ide_api/src/completion/completion_item.rs expression: kind_completions --- @@ -10,48 +10,48 @@ expression: kind_completions source_range: [92; 92), delete: [92; 92), insert: "else {$0}", - kind: Keyword + kind: Keyword, }, CompletionItem { label: "else if", source_range: [92; 92), delete: [92; 92), insert: "else if $0 {}", - kind: Keyword + kind: Keyword, }, CompletionItem { label: "if", source_range: [92; 92), delete: [92; 92), insert: "if $0 {}", - kind: Keyword + kind: Keyword, }, CompletionItem { label: "loop", source_range: [92; 92), delete: [92; 92), insert: "loop {$0}", - kind: Keyword + kind: Keyword, }, CompletionItem { label: "match", source_range: [92; 92), delete: [92; 92), insert: "match $0 {}", - kind: Keyword + kind: Keyword, }, CompletionItem { label: "return", source_range: [92; 92), delete: [92; 92), insert: "return;", - kind: Keyword + kind: Keyword, }, CompletionItem { label: "while", source_range: [92; 92), delete: [92; 92), insert: "while $0 {}", - kind: Keyword - } + kind: Keyword, + }, ] 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 e2b9214fb..1098ecf54 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-02-18T09:22:24.049699338Z" -creator: insta@0.6.2 +created: "2019-05-23T22:23:35.085655258Z" +creator: insta@0.8.1 source: crates/ra_ide_api/src/completion/completion_item.rs expression: kind_completions --- @@ -10,34 +10,34 @@ expression: kind_completions source_range: [48; 48), delete: [48; 48), insert: "if $0 {}", - kind: Keyword + kind: Keyword, }, CompletionItem { label: "loop", source_range: [48; 48), delete: [48; 48), insert: "loop {$0}", - kind: Keyword + kind: Keyword, }, CompletionItem { label: "match", source_range: [48; 48), delete: [48; 48), insert: "match $0 {}", - kind: Keyword + kind: Keyword, }, CompletionItem { label: "return", source_range: [48; 48), delete: [48; 48), insert: "return $0;", - kind: Keyword + kind: Keyword, }, CompletionItem { label: "while", source_range: [48; 48), delete: [48; 48), insert: "while $0 {}", - kind: Keyword - } + kind: Keyword, + }, ] 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 1ea7eb5ce..3c5eca1ba 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-02-18T09:22:24.090949782Z" -creator: insta@0.6.2 +created: "2019-05-23T22:44:10.869539856Z" +creator: insta@0.8.1 source: crates/ra_ide_api/src/completion/completion_item.rs expression: kind_completions --- @@ -10,34 +10,34 @@ expression: kind_completions source_range: [41; 41), delete: [41; 41), insert: "if $0 {}", - kind: Keyword + kind: Keyword, }, CompletionItem { label: "loop", source_range: [41; 41), delete: [41; 41), insert: "loop {$0}", - kind: Keyword + kind: Keyword, }, CompletionItem { label: "match", source_range: [41; 41), delete: [41; 41), insert: "match $0 {}", - kind: Keyword + kind: Keyword, }, CompletionItem { label: "return", source_range: [41; 41), delete: [41; 41), insert: "return;", - kind: Keyword + kind: Keyword, }, CompletionItem { label: "while", source_range: [41; 41), delete: [41; 41), insert: "while $0 {}", - kind: Keyword - } + kind: Keyword, + }, ] diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__keywords_in_use_stmt1.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__keywords_in_use_stmt1.snap index 76d5daf55..71d7e9de8 100644 --- a/crates/ra_ide_api/src/completion/snapshots/completion_item__keywords_in_use_stmt1.snap +++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__keywords_in_use_stmt1.snap @@ -1,6 +1,6 @@ --- -created: "2019-02-18T09:22:23.988755424Z" -creator: insta@0.6.2 +created: "2019-05-23T22:23:35.066687241Z" +creator: insta@0.8.1 source: crates/ra_ide_api/src/completion/completion_item.rs expression: kind_completions --- @@ -10,20 +10,20 @@ expression: kind_completions source_range: [17; 17), delete: [17; 17), insert: "crate::", - kind: Keyword + kind: Keyword, }, CompletionItem { label: "self", source_range: [17; 17), delete: [17; 17), insert: "self", - kind: Keyword + kind: Keyword, }, CompletionItem { label: "super", source_range: [17; 17), delete: [17; 17), insert: "super::", - kind: Keyword - } + kind: Keyword, + }, ] diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__keywords_in_use_stmt2.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__keywords_in_use_stmt2.snap index ee8bf4ca1..ad156fb44 100644 --- a/crates/ra_ide_api/src/completion/snapshots/completion_item__keywords_in_use_stmt2.snap +++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__keywords_in_use_stmt2.snap @@ -1,6 +1,6 @@ --- -created: "2019-02-18T09:22:24.030382527Z" -creator: insta@0.6.2 +created: "2019-05-23T22:44:10.859494330Z" +creator: insta@0.8.1 source: crates/ra_ide_api/src/completion/completion_item.rs expression: kind_completions --- @@ -10,13 +10,13 @@ expression: kind_completions source_range: [20; 20), delete: [20; 20), insert: "self", - kind: Keyword + kind: Keyword, }, CompletionItem { label: "super", source_range: [20; 20), delete: [20; 20), insert: "super::", - kind: Keyword - } + kind: Keyword, + }, ] diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__keywords_in_use_stmt3.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__keywords_in_use_stmt3.snap index b44db276e..e7b11d532 100644 --- a/crates/ra_ide_api/src/completion/snapshots/completion_item__keywords_in_use_stmt3.snap +++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__keywords_in_use_stmt3.snap @@ -1,6 +1,6 @@ --- -created: "2019-02-18T09:22:24.073607133Z" -creator: insta@0.6.2 +created: "2019-05-23T22:44:40.506690279Z" +creator: insta@0.8.1 source: crates/ra_ide_api/src/completion/completion_item.rs expression: kind_completions --- @@ -10,13 +10,13 @@ expression: kind_completions source_range: [24; 24), delete: [24; 24), insert: "self", - kind: Keyword + kind: Keyword, }, CompletionItem { label: "super", source_range: [24; 24), delete: [24; 24), insert: "super::", - kind: Keyword - } + kind: Keyword, + }, ] 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 f220d35c2..e7069dc0c 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-02-18T09:22:23.989188654Z" -creator: insta@0.6.2 +created: "2019-05-23T22:23:35.082403612Z" +creator: insta@0.8.1 source: crates/ra_ide_api/src/completion/completion_item.rs expression: kind_completions --- @@ -10,34 +10,34 @@ expression: kind_completions source_range: [83; 83), delete: [83; 83), insert: "if $0 {}", - kind: Keyword + kind: Keyword, }, CompletionItem { label: "loop", source_range: [83; 83), delete: [83; 83), insert: "loop {$0}", - kind: Keyword + kind: Keyword, }, CompletionItem { label: "match", source_range: [83; 83), delete: [83; 83), insert: "match $0 {}", - kind: Keyword + kind: Keyword, }, CompletionItem { label: "return", source_range: [83; 83), delete: [83; 83), insert: "return $0;", - kind: Keyword + kind: Keyword, }, CompletionItem { label: "while", source_range: [83; 83), delete: [83; 83), insert: "while $0 {}", - kind: Keyword - } + kind: Keyword, + }, ] 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 d2093acdf..47beb904b 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-02-18T09:22:24.036383875Z" -creator: insta@0.6.2 +created: "2019-05-23T22:44:10.871868390Z" +creator: insta@0.8.1 source: crates/ra_ide_api/src/completion/completion_item.rs expression: kind_completions --- @@ -10,34 +10,34 @@ expression: kind_completions source_range: [83; 83), delete: [83; 83), insert: "if $0 {}", - kind: Keyword + kind: Keyword, }, CompletionItem { label: "loop", source_range: [83; 83), delete: [83; 83), insert: "loop {$0}", - kind: Keyword + kind: Keyword, }, CompletionItem { label: "match", source_range: [83; 83), delete: [83; 83), insert: "match $0 {}", - kind: Keyword + kind: Keyword, }, CompletionItem { label: "return", source_range: [83; 83), delete: [83; 83), insert: "return $0;", - kind: Keyword + kind: Keyword, }, CompletionItem { label: "while", source_range: [83; 83), delete: [83; 83), insert: "while $0 {}", - kind: Keyword - } + kind: Keyword, + }, ] diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__mod_with_docs.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__mod_with_docs.snap index 1da3c3ba2..f2b26e393 100644 --- a/crates/ra_ide_api/src/completion/snapshots/completion_item__mod_with_docs.snap +++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__mod_with_docs.snap @@ -1,6 +1,6 @@ --- -created: "2019-02-18T09:22:24.066918191Z" -creator: insta@0.6.2 +created: "2019-05-23T22:23:35.093689514Z" +creator: insta@0.8.1 source: crates/ra_ide_api/src/completion/completion_item.rs expression: kind_completions --- @@ -12,7 +12,7 @@ expression: kind_completions insert: "my", kind: Module, documentation: Documentation( - "Some simple\ndocs describing `mod my`." - ) - } + "Some simple\ndocs describing `mod my`.", + ), + }, ] diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__module_items.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__module_items.snap index 86bc8679d..cee4898c3 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,6 +1,6 @@ --- -created: "2019-02-18T09:22:24.161888678Z" -creator: insta@0.6.2 +created: "2019-05-23T22:23:35.133106898Z" +creator: insta@0.8.1 source: crates/ra_ide_api/src/completion/completion_item.rs expression: kind_completions --- @@ -10,14 +10,14 @@ expression: kind_completions source_range: [89; 89), delete: [89; 89), insert: "Baz", - kind: Enum + kind: Enum, }, CompletionItem { label: "Foo", source_range: [89; 89), delete: [89; 89), insert: "Foo", - kind: Struct + kind: Struct, }, CompletionItem { label: "quux", @@ -25,6 +25,6 @@ expression: kind_completions delete: [89; 89), insert: "quux()$0", kind: Function, - detail: "fn quux()" - } + detail: "fn quux()", + }, ] 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 9f796b7ca..ce18e5bb7 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,6 +1,6 @@ --- -created: "2019-02-18T09:22:24.180517419Z" -creator: insta@0.6.2 +created: "2019-05-23T22:23:35.134417551Z" +creator: insta@0.8.1 source: crates/ra_ide_api/src/completion/completion_item.rs expression: kind_completions --- @@ -10,7 +10,7 @@ expression: kind_completions source_range: [101; 101), delete: [101; 101), insert: "Bar", - kind: Struct + kind: Struct, }, CompletionItem { label: "quux", @@ -18,6 +18,6 @@ expression: kind_completions delete: [101; 101), insert: "quux()$0", kind: Function, - detail: "fn quux()" - } + detail: "fn quux()", + }, ] diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__nested_use_tree.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__nested_use_tree.snap index 4920e500e..4c143d28e 100644 --- a/crates/ra_ide_api/src/completion/snapshots/completion_item__nested_use_tree.snap +++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__nested_use_tree.snap @@ -1,6 +1,6 @@ --- -created: "2019-02-18T09:22:24.085605313Z" -creator: insta@0.6.2 +created: "2019-05-23T22:23:35.099358768Z" +creator: insta@0.8.1 source: crates/ra_ide_api/src/completion/completion_item.rs expression: kind_completions --- @@ -10,13 +10,13 @@ expression: kind_completions source_range: [12; 14), delete: [12; 14), insert: "Spam", - kind: Struct + kind: Struct, }, CompletionItem { label: "foo", source_range: [12; 14), delete: [12; 14), insert: "foo", - kind: Module - } + kind: Module, + }, ] 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 038e7f402..22e25fe3d 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,6 +1,6 @@ --- -created: "2019-02-18T09:22:23.999953358Z" -creator: insta@0.6.2 +created: "2019-05-23T22:23:35.085365816Z" +creator: insta@0.8.1 source: crates/ra_ide_api/src/completion/completion_item.rs expression: kind_completions --- @@ -10,48 +10,48 @@ expression: kind_completions source_range: [106; 108), delete: [106; 108), insert: "break", - kind: Keyword + kind: Keyword, }, CompletionItem { label: "continue", source_range: [106; 108), delete: [106; 108), insert: "continue", - kind: Keyword + kind: Keyword, }, CompletionItem { label: "if", source_range: [106; 108), delete: [106; 108), insert: "if $0 {}", - kind: Keyword + kind: Keyword, }, CompletionItem { label: "loop", source_range: [106; 108), delete: [106; 108), insert: "loop {$0}", - kind: Keyword + kind: Keyword, }, CompletionItem { label: "match", source_range: [106; 108), delete: [106; 108), insert: "match $0 {}", - kind: Keyword + kind: Keyword, }, CompletionItem { label: "return", source_range: [106; 108), delete: [106; 108), insert: "return", - kind: Keyword + kind: Keyword, }, CompletionItem { label: "while", source_range: [106; 108), delete: [106; 108), insert: "while $0 {}", - kind: Keyword - } + kind: Keyword, + }, ] diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__postfix_completion_works_for_trivial_path_expression.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__postfix_completion_works_for_trivial_path_expression.snap index 3bbc9e3c4..fcb292596 100644 --- a/crates/ra_ide_api/src/completion/snapshots/completion_item__postfix_completion_works_for_trivial_path_expression.snap +++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__postfix_completion_works_for_trivial_path_expression.snap @@ -1,6 +1,6 @@ --- -created: "2019-04-22T07:37:13.981826301Z" -creator: insta@0.7.4 +created: "2019-05-23T22:23:35.118738523Z" +creator: insta@0.8.1 source: crates/ra_ide_api/src/completion/completion_item.rs expression: kind_completions --- @@ -10,48 +10,48 @@ expression: kind_completions source_range: [76; 76), delete: [72; 76), insert: "dbg!(bar)", - detail: "dbg!(expr)" + detail: "dbg!(expr)", }, CompletionItem { label: "if", source_range: [76; 76), delete: [72; 76), insert: "if bar {$0}", - detail: "if expr {}" + detail: "if expr {}", }, CompletionItem { label: "match", source_range: [76; 76), delete: [72; 76), insert: "match bar {\n ${1:_} => {$0\\},\n}", - detail: "match expr {}" + detail: "match expr {}", }, CompletionItem { label: "not", source_range: [76; 76), delete: [72; 76), insert: "!bar", - detail: "!expr" + detail: "!expr", }, CompletionItem { label: "ref", source_range: [76; 76), delete: [72; 76), insert: "&bar", - detail: "&expr" + detail: "&expr", }, CompletionItem { label: "refm", source_range: [76; 76), delete: [72; 76), insert: "&mut bar", - detail: "&mut expr" + detail: "&mut expr", }, CompletionItem { label: "while", source_range: [76; 76), delete: [72; 76), insert: "while bar {\n$0\n}", - detail: "while expr {}" - } + detail: "while expr {}", + }, ] diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__return_type.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__return_type.snap index ff36df707..16dd18431 100644 --- a/crates/ra_ide_api/src/completion/snapshots/completion_item__return_type.snap +++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__return_type.snap @@ -1,6 +1,6 @@ --- -created: "2019-04-04T14:52:24.525395600Z" -creator: insta@0.7.4 +created: "2019-05-23T22:23:35.140648630Z" +creator: insta@0.8.1 source: crates/ra_ide_api/src/completion/completion_item.rs expression: kind_completions --- @@ -10,7 +10,7 @@ expression: kind_completions source_range: [47; 47), delete: [47; 47), insert: "Foo", - kind: Struct + kind: Struct, }, CompletionItem { label: "x", @@ -18,6 +18,6 @@ expression: kind_completions delete: [47; 47), insert: "x()$0", kind: Function, - detail: "fn x()" - } + detail: "fn x()", + }, ] diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__self_in_methods.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__self_in_methods.snap index baf12cae1..e1af94870 100644 --- a/crates/ra_ide_api/src/completion/snapshots/completion_item__self_in_methods.snap +++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__self_in_methods.snap @@ -1,6 +1,6 @@ --- -created: "2019-02-18T09:22:24.174038680Z" -creator: insta@0.6.2 +created: "2019-05-23T22:23:35.141900902Z" +creator: insta@0.8.1 source: crates/ra_ide_api/src/completion/completion_item.rs expression: kind_completions --- @@ -10,13 +10,13 @@ expression: kind_completions source_range: [25; 25), delete: [25; 25), insert: "Self", - kind: TypeParam + kind: TypeParam, }, CompletionItem { label: "self", source_range: [25; 25), delete: [25; 25), insert: "self", - kind: Binding - } + kind: Binding, + }, ] diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__snippets_in_expressions.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__snippets_in_expressions.snap index fce2d6479..6f41bf76f 100644 --- a/crates/ra_ide_api/src/completion/snapshots/completion_item__snippets_in_expressions.snap +++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__snippets_in_expressions.snap @@ -1,6 +1,6 @@ --- -created: "2019-02-18T09:22:24.191576723Z" -creator: insta@0.6.2 +created: "2019-05-23T22:23:35.141901047Z" +creator: insta@0.8.1 source: crates/ra_ide_api/src/completion/completion_item.rs expression: kind_completions --- @@ -10,13 +10,13 @@ expression: kind_completions source_range: [17; 17), delete: [17; 17), insert: "eprintln!(\"$0 = {:?}\", $0);", - kind: Snippet + kind: Snippet, }, CompletionItem { label: "ppd", source_range: [17; 17), delete: [17; 17), insert: "eprintln!(\"$0 = {:#?}\", $0);", - kind: Snippet - } + kind: Snippet, + }, ] diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__snippets_in_items.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__snippets_in_items.snap index d2b1a5f0e..1eb0adebe 100644 --- a/crates/ra_ide_api/src/completion/snapshots/completion_item__snippets_in_items.snap +++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__snippets_in_items.snap @@ -1,6 +1,6 @@ --- -created: "2019-02-18T09:22:24.187670733Z" -creator: insta@0.6.2 +created: "2019-05-23T22:23:35.149234118Z" +creator: insta@0.8.1 source: crates/ra_ide_api/src/completion/completion_item.rs expression: kind_completions --- @@ -11,13 +11,13 @@ expression: kind_completions delete: [66; 66), insert: "#[test]\nfn ${1:feature}() {\n $0\n}", kind: Snippet, - lookup: "tfn" + lookup: "tfn", }, CompletionItem { label: "pub(crate)", source_range: [66; 66), delete: [66; 66), insert: "pub(crate) $0", - kind: Snippet - } + kind: Snippet, + }, ] diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__struct_associated_const.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__struct_associated_const.snap index 6ad4c5acc..f7bc6177c 100644 --- a/crates/ra_ide_api/src/completion/snapshots/completion_item__struct_associated_const.snap +++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__struct_associated_const.snap @@ -1,6 +1,6 @@ --- -created: "2019-02-18T09:22:24.093406123Z" -creator: insta@0.6.2 +created: "2019-05-23T22:23:35.101474826Z" +creator: insta@0.8.1 source: crates/ra_ide_api/src/completion/completion_item.rs expression: kind_completions --- @@ -13,7 +13,7 @@ expression: kind_completions kind: Const, detail: "const C: i32 = 42;", documentation: Documentation( - "An associated const" - ) - } + "An associated const", + ), + }, ] diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__struct_associated_method.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__struct_associated_method.snap index 7c69eebeb..45080a802 100644 --- a/crates/ra_ide_api/src/completion/snapshots/completion_item__struct_associated_method.snap +++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__struct_associated_method.snap @@ -1,6 +1,6 @@ --- -created: "2019-02-24T16:33:47.990111169Z" -creator: insta@0.6.3 +created: "2019-05-23T22:23:35.102351365Z" +creator: insta@0.8.1 source: crates/ra_ide_api/src/completion/completion_item.rs expression: kind_completions --- @@ -13,7 +13,7 @@ expression: kind_completions kind: Function, detail: "fn m()", documentation: Documentation( - "An associated method" - ) - } + "An associated method", + ), + }, ] diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__struct_associated_type.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__struct_associated_type.snap index 583bda225..f40065286 100644 --- a/crates/ra_ide_api/src/completion/snapshots/completion_item__struct_associated_type.snap +++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__struct_associated_type.snap @@ -1,6 +1,6 @@ --- -created: "2019-02-18T09:22:24.090876030Z" -creator: insta@0.6.2 +created: "2019-05-23T22:23:35.105188762Z" +creator: insta@0.8.1 source: crates/ra_ide_api/src/completion/completion_item.rs expression: kind_completions --- @@ -13,7 +13,7 @@ expression: kind_completions kind: TypeAlias, detail: "type T = i32;", documentation: Documentation( - "An associated type" - ) - } + "An associated type", + ), + }, ] diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__use_item_starting_with_crate.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__use_item_starting_with_crate.snap index 34e70c35d..17e831c84 100644 --- a/crates/ra_ide_api/src/completion/snapshots/completion_item__use_item_starting_with_crate.snap +++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__use_item_starting_with_crate.snap @@ -1,6 +1,6 @@ --- -created: "2019-02-18T09:22:24.098574884Z" -creator: insta@0.6.2 +created: "2019-05-23T22:23:35.105336210Z" +creator: insta@0.8.1 source: crates/ra_ide_api/src/completion/completion_item.rs expression: kind_completions --- @@ -10,13 +10,13 @@ expression: kind_completions source_range: [11; 13), delete: [11; 13), insert: "Spam", - kind: Struct + kind: Struct, }, CompletionItem { label: "foo", source_range: [11; 13), delete: [11; 13), insert: "foo", - kind: Module - } + kind: Module, + }, ] diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__use_item_starting_with_self.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__use_item_starting_with_self.snap index d15f1905b..d1abc6b5b 100644 --- a/crates/ra_ide_api/src/completion/snapshots/completion_item__use_item_starting_with_self.snap +++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__use_item_starting_with_self.snap @@ -1,6 +1,6 @@ --- -created: "2019-02-18T09:22:24.102063333Z" -creator: insta@0.6.2 +created: "2019-05-23T22:23:35.106923266Z" +creator: insta@0.8.1 source: crates/ra_ide_api/src/completion/completion_item.rs expression: kind_completions --- @@ -10,6 +10,6 @@ expression: kind_completions source_range: [26; 26), delete: [26; 26), insert: "Bar", - kind: Struct - } + kind: Struct, + }, ] diff --git a/crates/ra_ide_api/src/diagnostics.rs b/crates/ra_ide_api/src/diagnostics.rs index 9a0eb2c14..923008708 100644 --- a/crates/ra_ide_api/src/diagnostics.rs +++ b/crates/ra_ide_api/src/diagnostics.rs @@ -310,28 +310,30 @@ mod tests { fn test_unresolved_module_diagnostic() { let (analysis, file_id) = single_file("mod foo;"); let diagnostics = analysis.diagnostics(file_id).unwrap(); - assert_debug_snapshot_matches!(diagnostics, @r####"[ - Diagnostic { - message: "unresolved module", - range: [0; 8), - fix: Some( - SourceChange { - label: "create module", - source_file_edits: [], - file_system_edits: [ - CreateFile { - source_root: SourceRootId( - 0 - ), - path: "foo.rs" - } - ], - cursor_position: None - } - ), - severity: Error - } -]"####); + assert_debug_snapshot_matches!(diagnostics, @r###" + ⋮[ + ⋮ Diagnostic { + ⋮ message: "unresolved module", + ⋮ range: [0; 8), + ⋮ fix: Some( + ⋮ SourceChange { + ⋮ label: "create module", + ⋮ source_file_edits: [], + ⋮ file_system_edits: [ + ⋮ CreateFile { + ⋮ source_root: SourceRootId( + ⋮ 0, + ⋮ ), + ⋮ path: "foo.rs", + ⋮ }, + ⋮ ], + ⋮ cursor_position: None, + ⋮ }, + ⋮ ), + ⋮ severity: Error, + ⋮ }, + ⋮] + "###); } #[test] diff --git a/crates/ra_ide_api/src/display/snapshots/tests__file_structure.snap b/crates/ra_ide_api/src/display/snapshots/tests__file_structure.snap index 32dd99484..3097977de 100644 --- a/crates/ra_ide_api/src/display/snapshots/tests__file_structure.snap +++ b/crates/ra_ide_api/src/display/snapshots/tests__file_structure.snap @@ -1,6 +1,6 @@ --- -created: "2019-04-08T09:44:50.196004400Z" -creator: insta@0.7.4 +created: "2019-05-23T22:23:35.168422050Z" +creator: insta@0.8.1 source: crates/ra_ide_api/src/display/structure.rs expression: structure --- @@ -12,20 +12,20 @@ expression: structure node_range: [1; 26), kind: STRUCT_DEF, detail: None, - deprecated: false + deprecated: false, }, StructureNode { parent: Some( - 0 + 0, ), label: "x", navigation_range: [18; 19), node_range: [18; 24), kind: NAMED_FIELD_DEF, detail: Some( - "i32" + "i32", ), - deprecated: false + deprecated: false, }, StructureNode { parent: None, @@ -34,46 +34,46 @@ expression: structure node_range: [28; 158), kind: MODULE, detail: None, - deprecated: false + deprecated: false, }, StructureNode { parent: Some( - 2 + 2, ), label: "bar1", navigation_range: [43; 47), node_range: [40; 52), kind: FN_DEF, detail: Some( - "fn()" + "fn()", ), - deprecated: false + deprecated: false, }, StructureNode { parent: Some( - 2 + 2, ), label: "bar2", navigation_range: [60; 64), node_range: [57; 81), kind: FN_DEF, detail: Some( - "fn(t: T) -> T" + "fn(t: T) -> T", ), - deprecated: false + deprecated: false, }, StructureNode { parent: Some( - 2 + 2, ), label: "bar3", navigation_range: [89; 93), node_range: [86; 156), kind: FN_DEF, detail: Some( - "fn(a: A, b: B) -> Vec< u32 >" + "fn(a: A, b: B) -> Vec< u32 >", ), - deprecated: false + deprecated: false, }, StructureNode { parent: None, @@ -82,29 +82,29 @@ expression: structure node_range: [160; 180), kind: ENUM_DEF, detail: None, - deprecated: false + deprecated: false, }, StructureNode { parent: Some( - 6 + 6, ), label: "X", navigation_range: [169; 170), node_range: [169; 170), kind: ENUM_VARIANT, detail: None, - deprecated: false + deprecated: false, }, StructureNode { parent: Some( - 6 + 6, ), label: "Y", navigation_range: [172; 173), node_range: [172; 178), kind: ENUM_VARIANT, detail: None, - deprecated: false + deprecated: false, }, StructureNode { parent: None, @@ -113,9 +113,9 @@ expression: structure node_range: [181; 193), kind: TYPE_ALIAS_DEF, detail: Some( - "()" + "()", ), - deprecated: false + deprecated: false, }, StructureNode { parent: None, @@ -124,9 +124,9 @@ expression: structure node_range: [194; 213), kind: STATIC_DEF, detail: Some( - "i32" + "i32", ), - deprecated: false + deprecated: false, }, StructureNode { parent: None, @@ -135,9 +135,9 @@ expression: structure node_range: [214; 232), kind: CONST_DEF, detail: Some( - "i32" + "i32", ), - deprecated: false + deprecated: false, }, StructureNode { parent: None, @@ -146,7 +146,7 @@ expression: structure node_range: [234; 243), kind: IMPL_BLOCK, detail: None, - deprecated: false + deprecated: false, }, StructureNode { parent: None, @@ -155,7 +155,7 @@ expression: structure node_range: [245; 269), kind: IMPL_BLOCK, detail: None, - deprecated: false + deprecated: false, }, StructureNode { parent: None, @@ -164,9 +164,9 @@ expression: structure node_range: [271; 301), kind: FN_DEF, detail: Some( - "fn()" + "fn()", ), - deprecated: true + deprecated: true, }, StructureNode { parent: None, @@ -175,8 +175,8 @@ expression: structure node_range: [303; 359), kind: FN_DEF, detail: Some( - "fn()" + "fn()", ), - deprecated: true - } + deprecated: true, + }, ] diff --git a/crates/ra_ide_api/src/snapshots/tests__highlighting.snap b/crates/ra_ide_api/src/snapshots/tests__highlighting.snap index 9d4c04db3..9c60aed2a 100644 --- a/crates/ra_ide_api/src/snapshots/tests__highlighting.snap +++ b/crates/ra_ide_api/src/snapshots/tests__highlighting.snap @@ -1,5 +1,5 @@ --- -created: "2019-05-23T12:10:32.628883358Z" +created: "2019-05-23T22:23:35.242742395Z" creator: insta@0.8.1 source: crates/ra_ide_api/src/syntax_highlighting.rs expression: result @@ -8,139 +8,139 @@ Ok( [ HighlightedRange { range: [1; 24), - tag: "attribute" + tag: "attribute", }, HighlightedRange { range: [25; 31), - tag: "keyword" + tag: "keyword", }, HighlightedRange { range: [32; 35), - tag: "function" + tag: "function", }, HighlightedRange { range: [42; 45), - tag: "keyword" + tag: "keyword", }, HighlightedRange { range: [46; 47), - tag: "function" + tag: "function", }, HighlightedRange { range: [49; 52), - tag: "text" + tag: "text", }, HighlightedRange { range: [58; 61), - tag: "keyword" + tag: "keyword", }, HighlightedRange { range: [62; 63), - tag: "function" + tag: "function", }, HighlightedRange { range: [65; 68), - tag: "text" + tag: "text", }, HighlightedRange { range: [73; 75), - tag: "keyword" + tag: "keyword", }, HighlightedRange { range: [76; 79), - tag: "function" + tag: "function", }, HighlightedRange { range: [80; 81), - tag: "type" + tag: "type", }, HighlightedRange { range: [80; 81), - tag: "function" + tag: "function", }, HighlightedRange { range: [88; 89), - tag: "type" + tag: "type", }, HighlightedRange { range: [96; 110), - tag: "macro" + tag: "macro", }, HighlightedRange { range: [117; 127), - tag: "comment" + tag: "comment", }, HighlightedRange { range: [128; 130), - tag: "keyword" + tag: "keyword", }, HighlightedRange { range: [131; 135), - tag: "function" + tag: "function", }, HighlightedRange { range: [145; 153), - tag: "macro" + tag: "macro", }, HighlightedRange { range: [154; 166), - tag: "string" + tag: "string", }, HighlightedRange { range: [168; 170), - tag: "literal" + tag: "literal", }, HighlightedRange { range: [178; 181), - tag: "keyword" + tag: "keyword", }, HighlightedRange { range: [182; 185), - tag: "keyword" + tag: "keyword", }, HighlightedRange { range: [186; 189), - tag: "macro" + tag: "macro", }, HighlightedRange { range: [197; 200), - tag: "macro" + tag: "macro", }, HighlightedRange { range: [192; 195), - tag: "text" + tag: "text", }, HighlightedRange { range: [208; 211), - tag: "macro" + tag: "macro", }, HighlightedRange { range: [212; 216), - tag: "macro" + tag: "macro", }, HighlightedRange { range: [226; 227), - tag: "literal" + tag: "literal", }, HighlightedRange { range: [232; 233), - tag: "literal" + tag: "literal", }, HighlightedRange { range: [242; 248), - tag: "keyword.unsafe" + tag: "keyword.unsafe", }, HighlightedRange { range: [251; 254), - tag: "text" + tag: "text", }, HighlightedRange { range: [255; 262), - tag: "text" + tag: "text", }, HighlightedRange { range: [263; 264), - tag: "literal" - } - ] + tag: "literal", + }, + ], ) diff --git a/crates/ra_ide_api/src/snapshots/tests__rename_mod.snap b/crates/ra_ide_api/src/snapshots/tests__rename_mod.snap index 890426db7..431de5c55 100644 --- a/crates/ra_ide_api/src/snapshots/tests__rename_mod.snap +++ b/crates/ra_ide_api/src/snapshots/tests__rename_mod.snap @@ -1,8 +1,8 @@ --- -created: "2019-01-24T08:39:53.759318522+00:00" -creator: insta@0.5.2 +created: "2019-05-23T22:23:35.215905447Z" +creator: insta@0.8.1 +source: crates/ra_ide_api/src/references.rs expression: "&source_change" -source: crates/ra_ide_api/src/rename.rs --- Some( SourceChange { @@ -10,29 +10,29 @@ Some( source_file_edits: [ SourceFileEdit { file_id: FileId( - 2 + 2, ), edit: TextEdit { atoms: [ AtomTextEdit { delete: [4; 7), - insert: "foo2" - } - ] - } - } + insert: "foo2", + }, + ], + }, + }, ], file_system_edits: [ MoveFile { src: FileId( - 3 + 3, ), dst_source_root: SourceRootId( - 0 + 0, ), - dst_path: "bar/foo2.rs" - } + dst_path: "bar/foo2.rs", + }, ], - cursor_position: None - } + cursor_position: None, + }, ) diff --git a/crates/ra_ide_api/src/snapshots/tests__rename_mod_in_dir.snap b/crates/ra_ide_api/src/snapshots/tests__rename_mod_in_dir.snap index e96bf5c02..aaff9b4b5 100644 --- a/crates/ra_ide_api/src/snapshots/tests__rename_mod_in_dir.snap +++ b/crates/ra_ide_api/src/snapshots/tests__rename_mod_in_dir.snap @@ -1,8 +1,8 @@ --- -created: "2019-01-22T14:45:00.975229300+00:00" -creator: insta@0.4.0 +created: "2019-05-23T22:23:35.213830371Z" +creator: insta@0.8.1 +source: crates/ra_ide_api/src/references.rs expression: "&source_change" -source: "crates\\ra_ide_api\\src\\rename.rs" --- Some( SourceChange { @@ -10,29 +10,29 @@ Some( source_file_edits: [ SourceFileEdit { file_id: FileId( - 1 + 1, ), edit: TextEdit { atoms: [ AtomTextEdit { delete: [4; 7), - insert: "foo2" - } - ] - } - } + insert: "foo2", + }, + ], + }, + }, ], file_system_edits: [ MoveFile { src: FileId( - 2 + 2, ), dst_source_root: SourceRootId( - 0 + 0, ), - dst_path: "foo2/mod.rs" - } + dst_path: "foo2/mod.rs", + }, ], - cursor_position: None - } + cursor_position: None, + }, ) diff --git a/crates/ra_ide_api/src/snapshots/tests__runnables.snap b/crates/ra_ide_api/src/snapshots/tests__runnables.snap index 71bd7a4bd..de2fadd7f 100644 --- a/crates/ra_ide_api/src/snapshots/tests__runnables.snap +++ b/crates/ra_ide_api/src/snapshots/tests__runnables.snap @@ -1,24 +1,24 @@ --- -created: "2019-01-22T14:45:00.975229300+00:00" -creator: insta@0.4.0 +created: "2019-05-23T22:23:35.217100106Z" +creator: insta@0.8.1 +source: crates/ra_ide_api/src/runnables.rs expression: "&runnables" -source: "crates\\ra_ide_api\\src\\runnables.rs" --- [ Runnable { range: [1; 21), - kind: Bin + kind: Bin, }, Runnable { range: [22; 46), kind: Test { - name: "test_foo" - } + name: "test_foo", + }, }, Runnable { range: [47; 81), kind: Test { - name: "test_foo" - } - } + name: "test_foo", + }, + }, ] diff --git a/crates/ra_ide_api/src/snapshots/tests__runnables_module.snap b/crates/ra_ide_api/src/snapshots/tests__runnables_module.snap index a28dd8952..23993a97f 100644 --- a/crates/ra_ide_api/src/snapshots/tests__runnables_module.snap +++ b/crates/ra_ide_api/src/snapshots/tests__runnables_module.snap @@ -1,20 +1,20 @@ --- -created: "2019-01-22T14:45:00.976230700+00:00" -creator: insta@0.4.0 +created: "2019-05-23T22:23:35.219258850Z" +creator: insta@0.8.1 +source: crates/ra_ide_api/src/runnables.rs expression: "&runnables" -source: "crates\\ra_ide_api\\src\\runnables.rs" --- [ Runnable { range: [1; 59), kind: TestMod { - path: "test_mod" - } + path: "test_mod", + }, }, Runnable { range: [28; 57), kind: Test { - name: "test_foo1" - } - } + name: "test_foo1", + }, + }, ] diff --git a/crates/ra_ide_api/src/snapshots/tests__runnables_multiple_depth_module.snap b/crates/ra_ide_api/src/snapshots/tests__runnables_multiple_depth_module.snap index 79f07bef9..c516a61df 100644 --- a/crates/ra_ide_api/src/snapshots/tests__runnables_multiple_depth_module.snap +++ b/crates/ra_ide_api/src/snapshots/tests__runnables_multiple_depth_module.snap @@ -1,20 +1,20 @@ --- -created: "2019-01-22T14:45:00.979218100+00:00" -creator: insta@0.4.0 +created: "2019-05-23T22:23:35.219671663Z" +creator: insta@0.8.1 +source: crates/ra_ide_api/src/runnables.rs expression: "&runnables" -source: "crates\\ra_ide_api\\src\\runnables.rs" --- [ Runnable { range: [41; 115), kind: TestMod { - path: "foo::bar::test_mod" - } + path: "foo::bar::test_mod", + }, }, Runnable { range: [68; 105), kind: Test { - name: "test_foo1" - } - } + name: "test_foo1", + }, + }, ] diff --git a/crates/ra_ide_api/src/snapshots/tests__runnables_one_depth_layer_module.snap b/crates/ra_ide_api/src/snapshots/tests__runnables_one_depth_layer_module.snap index d199e9073..b02e6707e 100644 --- a/crates/ra_ide_api/src/snapshots/tests__runnables_one_depth_layer_module.snap +++ b/crates/ra_ide_api/src/snapshots/tests__runnables_one_depth_layer_module.snap @@ -1,20 +1,20 @@ --- -created: "2019-01-22T14:45:01.016119500+00:00" -creator: insta@0.4.0 +created: "2019-05-23T22:23:35.224315047Z" +creator: insta@0.8.1 +source: crates/ra_ide_api/src/runnables.rs expression: "&runnables" -source: "crates\\ra_ide_api\\src\\runnables.rs" --- [ Runnable { range: [23; 85), kind: TestMod { - path: "foo::test_mod" - } + path: "foo::test_mod", + }, }, Runnable { range: [46; 79), kind: Test { - name: "test_foo1" - } - } + name: "test_foo1", + }, + }, ] -- cgit v1.2.3 From 0270b4bc577ba57f211d25bab161a607b9b94ec5 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Fri, 24 May 2019 01:48:44 +0300 Subject: reformat --- crates/ra_parser/src/grammar/items.rs | 4 ++-- crates/ra_parser/src/grammar/items/traits.rs | 4 ++-- crates/ra_parser/src/grammar/type_params.rs | 4 ++-- crates/ra_parser/src/grammar/types.rs | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) (limited to 'crates') diff --git a/crates/ra_parser/src/grammar/items.rs b/crates/ra_parser/src/grammar/items.rs index 6728e395f..7718fbe6a 100644 --- a/crates/ra_parser/src/grammar/items.rs +++ b/crates/ra_parser/src/grammar/items.rs @@ -103,7 +103,7 @@ pub(super) fn maybe_item(p: &mut Parser, m: Marker, flavor: ItemFlavor) -> Resul p.bump_remap(T![auto]); has_mods = true; } - if p.at(IDENT) && p.at_contextual_kw("default") && p.nth(1) == T![impl ] { + if p.at(IDENT) && p.at_contextual_kw("default") && p.nth(1) == T![impl] { p.bump_remap(T![default]); has_mods = true; } @@ -161,7 +161,7 @@ pub(super) fn maybe_item(p: &mut Parser, m: Marker, flavor: ItemFlavor) -> Resul // test unsafe_default_impl // unsafe default impl Foo {} - T![impl ] => { + T![impl] => { traits::impl_block(p); m.complete(p, IMPL_BLOCK); } diff --git a/crates/ra_parser/src/grammar/items/traits.rs b/crates/ra_parser/src/grammar/items/traits.rs index 09ab3bfd4..5fcacfbff 100644 --- a/crates/ra_parser/src/grammar/items/traits.rs +++ b/crates/ra_parser/src/grammar/items/traits.rs @@ -44,7 +44,7 @@ pub(crate) fn trait_item_list(p: &mut Parser) { // test impl_block // impl Foo {} pub(super) fn impl_block(p: &mut Parser) { - assert!(p.at(T![impl ])); + assert!(p.at(T![impl])); p.bump(); if choose_type_params_over_qpath(p) { type_params::opt_type_param_list(p); @@ -130,7 +130,7 @@ fn choose_type_params_over_qpath(p: &Parser) -> bool { // impl impl NotType {} // impl Trait2 for impl NotType {} pub(crate) fn impl_type(p: &mut Parser) { - if p.at(T![impl ]) { + if p.at(T![impl]) { p.error("expected trait or type"); return; } diff --git a/crates/ra_parser/src/grammar/type_params.rs b/crates/ra_parser/src/grammar/type_params.rs index 4bbfed780..ef59b59d3 100644 --- a/crates/ra_parser/src/grammar/type_params.rs +++ b/crates/ra_parser/src/grammar/type_params.rs @@ -150,7 +150,7 @@ pub(super) fn opt_where_clause(p: &mut Parser) { fn is_where_predicate(p: &mut Parser) -> bool { match p.current() { LIFETIME => true, - T![impl ] => false, + T![impl] => false, token => types::TYPE_FIRST.contains(token), } } @@ -170,7 +170,7 @@ fn where_predicate(p: &mut Parser) { p.error("expected colon"); } } - T![impl ] => { + T![impl] => { p.error("expected lifetime or type"); } _ => { diff --git a/crates/ra_parser/src/grammar/types.rs b/crates/ra_parser/src/grammar/types.rs index 438e3ab0e..c0b722569 100644 --- a/crates/ra_parser/src/grammar/types.rs +++ b/crates/ra_parser/src/grammar/types.rs @@ -25,7 +25,7 @@ fn type_with_bounds_cond(p: &mut Parser, allow_bounds: bool) { T![_] => placeholder_type(p), T![fn] | T![unsafe] | T![extern] => fn_pointer_type(p), T![for] => for_type(p), - T![impl ] => impl_trait_type(p), + T![impl] => impl_trait_type(p), T![dyn ] => dyn_trait_type(p), // Some path types are not allowed to have bounds (no plus) T![<] => path_type_(p, allow_bounds), @@ -221,7 +221,7 @@ pub(super) fn for_type(p: &mut Parser) { // test impl_trait_type // type A = impl Iterator> + 'a; fn impl_trait_type(p: &mut Parser) { - assert!(p.at(T![impl ])); + assert!(p.at(T![impl])); let m = p.start(); p.bump(); type_params::bounds_without_colon(p); -- cgit v1.2.3