From a92db7c84829becdf95e0a5ef6e27cdf833518b8 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Mon, 18 Feb 2019 12:23:31 +0300 Subject: more compact edits in insta --- .../ra_ide_api/src/completion/completion_item.rs | 12 +++- .../completion_item__bindings_from_for.snap | 22 ++----- .../completion_item__bindings_from_if_let.snap | 32 +++------- .../completion_item__bindings_from_let.snap | 32 +++------- ...em__completes_break_and_continue_in_loops1.snap | 72 +++++----------------- ...em__completes_break_and_continue_in_loops2.snap | 52 ++++------------ .../completion_item__completes_prelude.snap | 32 +++------- ...on_item__completes_use_paths_across_crates.snap | 12 +--- .../completion_item__deeply_nested_use_tree.snap | 12 +--- ...t_add_semi_after_return_if_not_a_statement.snap | 52 ++++------------ ...ont_render_function_parens_if_already_call.snap | 22 ++----- ...r_function_parens_if_already_call_assoc_fn.snap | 12 +--- ...m__dont_render_function_parens_in_use_item.snap | 12 +--- ...__dont_show_both_completions_for_shadowing.snap | 22 ++----- .../snapshots/completion_item__enum_variant.snap | 22 ++----- ...completion_item__enum_variant_with_details.snap | 32 +++------- .../snapshots/completion_item__extern_prelude.snap | 12 +--- .../snapshots/completion_item__generic_params.snap | 22 ++----- .../completion_item__generic_params_in_struct.snap | 22 ++----- ...n_item__inserts_parens_for_function_calls1.snap | 22 ++----- ...n_item__inserts_parens_for_function_calls2.snap | 22 ++----- ...n_item__inserts_parens_for_function_calls3.snap | 12 +--- .../completion_item__keywords_in_function1.snap | 52 ++++------------ .../completion_item__keywords_in_function2.snap | 72 +++++----------------- .../completion_item__keywords_in_function3.snap | 52 ++++------------ .../completion_item__keywords_in_function4.snap | 52 ++++------------ .../completion_item__keywords_in_use_stmt1.snap | 32 +++------- .../completion_item__keywords_in_use_stmt2.snap | 22 ++----- .../completion_item__keywords_in_use_stmt3.snap | 22 ++----- ...etion_item__last_return_in_block_has_semi1.snap | 52 ++++------------ ...etion_item__last_return_in_block_has_semi2.snap | 52 ++++------------ .../completion_item__method_attr_filtering.snap | 12 +--- .../completion_item__method_completion.snap | 12 +--- .../snapshots/completion_item__mod_with_docs.snap | 12 +--- .../snapshots/completion_item__module_items.snap | 32 +++------- ...etion_item__module_items_in_nested_modules.snap | 22 ++----- .../completion_item__nested_use_tree.snap | 22 ++----- ...item__no_semi_after_break_continue_in_expr.snap | 72 +++++----------------- ...mpletion_item__param_completion_last_param.snap | 12 +--- ...ompletion_item__param_completion_nth_param.snap | 12 +--- ...pletion_item__param_completion_trait_param.snap | 12 +--- ...mpletion_works_for_trivial_path_expression.snap | 72 +++++----------------- .../snapshots/completion_item__return_type.snap | 22 ++----- .../completion_item__self_in_methods.snap | 22 ++----- .../completion_item__snippets_in_expressions.snap | 22 ++----- .../completion_item__snippets_in_items.snap | 22 ++----- .../completion_item__struct_associated_const.snap | 12 +--- .../completion_item__struct_associated_method.snap | 12 +--- .../completion_item__struct_associated_type.snap | 12 +--- .../completion_item__struct_field_completion.snap | 12 +--- ...on_item__struct_field_completion_autoderef.snap | 22 ++----- ...pletion_item__struct_field_completion_self.snap | 22 ++----- .../completion_item__tuple_field_completion.snap | 22 ++----- ...pletion_item__use_item_starting_with_crate.snap | 22 ++----- ...mpletion_item__use_item_starting_with_self.snap | 12 +--- 55 files changed, 339 insertions(+), 1161 deletions(-) (limited to 'crates') diff --git a/crates/ra_ide_api/src/completion/completion_item.rs b/crates/ra_ide_api/src/completion/completion_item.rs index 9aa9768d1..95bdd59b4 100644 --- a/crates/ra_ide_api/src/completion/completion_item.rs +++ b/crates/ra_ide_api/src/completion/completion_item.rs @@ -52,12 +52,18 @@ pub struct CompletionItem { documentation: Option, } +// We use custom debug for CompletionItem to make `insta`'s diffs more readable. impl fmt::Debug for CompletionItem { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { let mut s = f.debug_struct("CompletionItem"); - s.field("label", &self.label()) - .field("source_range", &self.source_range()) - .field("text_edit", &self.text_edit); + s.field("label", &self.label()).field("source_range", &self.source_range()); + if self.text_edit().as_atoms().len() == 1 { + let atom = &self.text_edit().as_atoms()[0]; + s.field("delete", &atom.delete); + s.field("insert", &atom.insert); + } else { + s.field("text_edit", &self.text_edit); + } if let Some(kind) = self.kind().as_ref() { s.field("kind", kind); } 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 e6e389fbd..bd7f99f71 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,5 +1,5 @@ --- -created: "2019-02-18T09:10:52.089782502Z" +created: "2019-02-18T09:22:24.132341107Z" creator: insta@0.6.2 source: crates/ra_ide_api/src/completion/completion_item.rs expression: kind_completions @@ -8,28 +8,16 @@ expression: kind_completions CompletionItem { label: "quux", source_range: [83; 83), - text_edit: TextEdit { - atoms: [ - AtomTextEdit { - delete: [83; 83), - insert: "quux()$0" - } - ] - }, + delete: [83; 83), + insert: "quux()$0", kind: Function, detail: "fn quux()" }, CompletionItem { label: "x", source_range: [83; 83), - text_edit: TextEdit { - atoms: [ - AtomTextEdit { - delete: [83; 83), - insert: "x" - } - ] - }, + delete: [83; 83), + insert: "x", 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 badaed8fe..3b374c4de 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,5 +1,5 @@ --- -created: "2019-02-18T09:10:52.092577354Z" +created: "2019-02-18T09:22:24.126809445Z" creator: insta@0.6.2 source: crates/ra_ide_api/src/completion/completion_item.rs expression: kind_completions @@ -8,40 +8,22 @@ expression: kind_completions CompletionItem { label: "a", source_range: [214; 214), - text_edit: TextEdit { - atoms: [ - AtomTextEdit { - delete: [214; 214), - insert: "a" - } - ] - }, + delete: [214; 214), + insert: "a", kind: Binding }, CompletionItem { label: "b", source_range: [214; 214), - text_edit: TextEdit { - atoms: [ - AtomTextEdit { - delete: [214; 214), - insert: "b" - } - ] - }, + delete: [214; 214), + insert: "b", kind: Binding }, CompletionItem { label: "quux", source_range: [214; 214), - text_edit: TextEdit { - atoms: [ - AtomTextEdit { - delete: [214; 214), - insert: "quux()$0" - } - ] - }, + delete: [214; 214), + insert: "quux()$0", kind: Function, 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 1b4cbf91e..173f5319a 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,5 +1,5 @@ --- -created: "2019-02-18T09:10:52.090000719Z" +created: "2019-02-18T09:22:24.126696322Z" creator: insta@0.6.2 source: crates/ra_ide_api/src/completion/completion_item.rs expression: kind_completions @@ -8,41 +8,23 @@ expression: kind_completions CompletionItem { label: "quux", source_range: [79; 79), - text_edit: TextEdit { - atoms: [ - AtomTextEdit { - delete: [79; 79), - insert: "quux($0)" - } - ] - }, + delete: [79; 79), + insert: "quux($0)", kind: Function, detail: "fn quux(x: i32)" }, CompletionItem { label: "x", source_range: [79; 79), - text_edit: TextEdit { - atoms: [ - AtomTextEdit { - delete: [79; 79), - insert: "x" - } - ] - }, + delete: [79; 79), + insert: "x", kind: Binding }, CompletionItem { label: "y", source_range: [79; 79), - text_edit: TextEdit { - atoms: [ - AtomTextEdit { - delete: [79; 79), - insert: "y" - } - ] - }, + delete: [79; 79), + insert: "y", 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 74f6fcd77..42ff02469 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,5 +1,5 @@ --- -created: "2019-02-18T09:10:51.974241301Z" +created: "2019-02-18T09:22:23.976673150Z" creator: insta@0.6.2 source: crates/ra_ide_api/src/completion/completion_item.rs expression: kind_completions @@ -8,92 +8,50 @@ expression: kind_completions CompletionItem { label: "break", source_range: [55; 55), - text_edit: TextEdit { - atoms: [ - AtomTextEdit { - delete: [55; 55), - insert: "break;" - } - ] - }, + delete: [55; 55), + insert: "break;", kind: Keyword }, CompletionItem { label: "continue", source_range: [55; 55), - text_edit: TextEdit { - atoms: [ - AtomTextEdit { - delete: [55; 55), - insert: "continue;" - } - ] - }, + delete: [55; 55), + insert: "continue;", kind: Keyword }, CompletionItem { label: "if", source_range: [55; 55), - text_edit: TextEdit { - atoms: [ - AtomTextEdit { - delete: [55; 55), - insert: "if $0 {}" - } - ] - }, + delete: [55; 55), + insert: "if $0 {}", kind: Keyword }, CompletionItem { label: "loop", source_range: [55; 55), - text_edit: TextEdit { - atoms: [ - AtomTextEdit { - delete: [55; 55), - insert: "loop {$0}" - } - ] - }, + delete: [55; 55), + insert: "loop {$0}", kind: Keyword }, CompletionItem { label: "match", source_range: [55; 55), - text_edit: TextEdit { - atoms: [ - AtomTextEdit { - delete: [55; 55), - insert: "match $0 {}" - } - ] - }, + delete: [55; 55), + insert: "match $0 {}", kind: Keyword }, CompletionItem { label: "return", source_range: [55; 55), - text_edit: TextEdit { - atoms: [ - AtomTextEdit { - delete: [55; 55), - insert: "return $0;" - } - ] - }, + delete: [55; 55), + insert: "return $0;", kind: Keyword }, CompletionItem { label: "while", source_range: [55; 55), - text_edit: TextEdit { - atoms: [ - AtomTextEdit { - delete: [55; 55), - insert: "while $0 {}" - } - ] - }, + delete: [55; 55), + insert: "while $0 {}", 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 225ca4c7f..057ff8a7a 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,5 +1,5 @@ --- -created: "2019-02-18T09:10:52.011157905Z" +created: "2019-02-18T09:22:24.068967569Z" creator: insta@0.6.2 source: crates/ra_ide_api/src/completion/completion_item.rs expression: kind_completions @@ -8,66 +8,36 @@ expression: kind_completions CompletionItem { label: "if", source_range: [60; 60), - text_edit: TextEdit { - atoms: [ - AtomTextEdit { - delete: [60; 60), - insert: "if $0 {}" - } - ] - }, + delete: [60; 60), + insert: "if $0 {}", kind: Keyword }, CompletionItem { label: "loop", source_range: [60; 60), - text_edit: TextEdit { - atoms: [ - AtomTextEdit { - delete: [60; 60), - insert: "loop {$0}" - } - ] - }, + delete: [60; 60), + insert: "loop {$0}", kind: Keyword }, CompletionItem { label: "match", source_range: [60; 60), - text_edit: TextEdit { - atoms: [ - AtomTextEdit { - delete: [60; 60), - insert: "match $0 {}" - } - ] - }, + delete: [60; 60), + insert: "match $0 {}", kind: Keyword }, CompletionItem { label: "return", source_range: [60; 60), - text_edit: TextEdit { - atoms: [ - AtomTextEdit { - delete: [60; 60), - insert: "return $0;" - } - ] - }, + delete: [60; 60), + insert: "return $0;", kind: Keyword }, CompletionItem { label: "while", source_range: [60; 60), - text_edit: TextEdit { - atoms: [ - AtomTextEdit { - delete: [60; 60), - insert: "while $0 {}" - } - ] - }, + delete: [60; 60), + insert: "while $0 {}", 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 58515b86f..16126ee77 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,5 +1,5 @@ --- -created: "2019-02-18T09:10:52.125606390Z" +created: "2019-02-18T09:22:24.180517434Z" creator: insta@0.6.2 source: crates/ra_ide_api/src/completion/completion_item.rs expression: kind_completions @@ -8,41 +8,23 @@ expression: kind_completions CompletionItem { label: "Option", source_range: [18; 18), - text_edit: TextEdit { - atoms: [ - AtomTextEdit { - delete: [18; 18), - insert: "Option" - } - ] - }, + delete: [18; 18), + insert: "Option", kind: Struct }, CompletionItem { label: "foo", source_range: [18; 18), - text_edit: TextEdit { - atoms: [ - AtomTextEdit { - delete: [18; 18), - insert: "foo()$0" - } - ] - }, + delete: [18; 18), + insert: "foo()$0", kind: Function, detail: "fn foo()" }, CompletionItem { label: "std", source_range: [18; 18), - text_edit: TextEdit { - atoms: [ - AtomTextEdit { - delete: [18; 18), - insert: "std" - } - ] - }, + delete: [18; 18), + insert: "std", 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 3b6ff57c1..2420e7744 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,5 +1,5 @@ --- -created: "2019-02-18T09:10:52.081693428Z" +created: "2019-02-18T09:22:24.118807216Z" creator: insta@0.6.2 source: crates/ra_ide_api/src/completion/completion_item.rs expression: kind_completions @@ -8,14 +8,8 @@ expression: kind_completions CompletionItem { label: "bar", source_range: [9; 9), - text_edit: TextEdit { - atoms: [ - AtomTextEdit { - delete: [9; 9), - insert: "bar" - } - ] - }, + delete: [9; 9), + insert: "bar", 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 1fb15ee0d..c472f7965 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,5 +1,5 @@ --- -created: "2019-02-18T09:10:52.018717911Z" +created: "2019-02-18T09:22:24.044567777Z" creator: insta@0.6.2 source: crates/ra_ide_api/src/completion/completion_item.rs expression: kind_completions @@ -8,14 +8,8 @@ expression: kind_completions CompletionItem { label: "Spam", source_range: [23; 25), - text_edit: TextEdit { - atoms: [ - AtomTextEdit { - delete: [23; 25), - insert: "Spam" - } - ] - }, + delete: [23; 25), + insert: "Spam", 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 34e75ef80..97bd76c49 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,5 +1,5 @@ --- -created: "2019-02-18T09:10:51.979744970Z" +created: "2019-02-18T09:22:23.987788705Z" creator: insta@0.6.2 source: crates/ra_ide_api/src/completion/completion_item.rs expression: kind_completions @@ -8,66 +8,36 @@ expression: kind_completions CompletionItem { label: "if", source_range: [85; 85), - text_edit: TextEdit { - atoms: [ - AtomTextEdit { - delete: [85; 85), - insert: "if $0 {}" - } - ] - }, + delete: [85; 85), + insert: "if $0 {}", kind: Keyword }, CompletionItem { label: "loop", source_range: [85; 85), - text_edit: TextEdit { - atoms: [ - AtomTextEdit { - delete: [85; 85), - insert: "loop {$0}" - } - ] - }, + delete: [85; 85), + insert: "loop {$0}", kind: Keyword }, CompletionItem { label: "match", source_range: [85; 85), - text_edit: TextEdit { - atoms: [ - AtomTextEdit { - delete: [85; 85), - insert: "match $0 {}" - } - ] - }, + delete: [85; 85), + insert: "match $0 {}", kind: Keyword }, CompletionItem { label: "return", source_range: [85; 85), - text_edit: TextEdit { - atoms: [ - AtomTextEdit { - delete: [85; 85), - insert: "return $0" - } - ] - }, + delete: [85; 85), + insert: "return $0", kind: Keyword }, CompletionItem { label: "while", source_range: [85; 85), - text_edit: TextEdit { - atoms: [ - AtomTextEdit { - delete: [85; 85), - insert: "while $0 {}" - } - ] - }, + delete: [85; 85), + insert: "while $0 {}", 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 89ae3d405..1de0efb5b 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,5 +1,5 @@ --- -created: "2019-02-18T09:10:52.163807552Z" +created: "2019-02-18T09:22:24.211680376Z" creator: insta@0.6.2 source: crates/ra_ide_api/src/completion/completion_item.rs expression: kind_completions @@ -8,28 +8,16 @@ expression: kind_completions CompletionItem { label: "frobnicate", source_range: [35; 39), - text_edit: TextEdit { - atoms: [ - AtomTextEdit { - delete: [35; 39), - insert: "frobnicate" - } - ] - }, + delete: [35; 39), + insert: "frobnicate", kind: Function, detail: "fn frobnicate()" }, CompletionItem { label: "main", source_range: [35; 39), - text_edit: TextEdit { - atoms: [ - AtomTextEdit { - delete: [35; 39), - insert: "main" - } - ] - }, + delete: [35; 39), + insert: "main", kind: Function, 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 ab4075c50..39fff2cb7 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,5 +1,5 @@ --- -created: "2019-02-18T09:10:52.194798097Z" +created: "2019-02-18T09:22:24.268227065Z" creator: insta@0.6.2 source: crates/ra_ide_api/src/completion/completion_item.rs expression: kind_completions @@ -8,14 +8,8 @@ expression: kind_completions CompletionItem { label: "new", source_range: [67; 69), - text_edit: TextEdit { - atoms: [ - AtomTextEdit { - delete: [67; 69), - insert: "new" - } - ] - }, + delete: [67; 69), + insert: "new", kind: Method, 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 259f9fc62..ef77816ec 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,5 +1,5 @@ --- -created: "2019-02-18T09:10:52.156083575Z" +created: "2019-02-18T09:22:24.213677341Z" creator: insta@0.6.2 source: crates/ra_ide_api/src/completion/completion_item.rs expression: kind_completions @@ -8,14 +8,8 @@ expression: kind_completions CompletionItem { label: "foo", source_range: [40; 41), - text_edit: TextEdit { - atoms: [ - AtomTextEdit { - delete: [40; 41), - insert: "foo" - } - ] - }, + delete: [40; 41), + insert: "foo", kind: Function, 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 7af2f3eb9..87691b304 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,5 +1,5 @@ --- -created: "2019-02-18T09:10:52.134207539Z" +created: "2019-02-18T09:22:24.188564584Z" creator: insta@0.6.2 source: crates/ra_ide_api/src/completion/completion_item.rs expression: kind_completions @@ -8,27 +8,15 @@ expression: kind_completions CompletionItem { label: "bar", source_range: [129; 129), - text_edit: TextEdit { - atoms: [ - AtomTextEdit { - delete: [129; 129), - insert: "bar" - } - ] - }, + delete: [129; 129), + insert: "bar", kind: Binding }, CompletionItem { label: "foo", source_range: [129; 129), - text_edit: TextEdit { - atoms: [ - AtomTextEdit { - delete: [129; 129), - insert: "foo()$0" - } - ] - }, + delete: [129; 129), + insert: "foo()$0", kind: Function, 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 7f36a5ec5..1df121523 100644 --- a/crates/ra_ide_api/src/completion/snapshots/completion_item__enum_variant.snap +++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__enum_variant.snap @@ -1,5 +1,5 @@ --- -created: "2019-02-18T09:10:52.033853029Z" +created: "2019-02-18T09:22:24.045355450Z" creator: insta@0.6.2 source: crates/ra_ide_api/src/completion/completion_item.rs expression: kind_completions @@ -8,14 +8,8 @@ expression: kind_completions CompletionItem { label: "Bar", source_range: [116; 116), - text_edit: TextEdit { - atoms: [ - AtomTextEdit { - delete: [116; 116), - insert: "Bar" - } - ] - }, + delete: [116; 116), + insert: "Bar", kind: EnumVariant, detail: "(i32)", documentation: Documentation( @@ -25,14 +19,8 @@ expression: kind_completions CompletionItem { label: "Foo", source_range: [116; 116), - text_edit: TextEdit { - atoms: [ - AtomTextEdit { - delete: [116; 116), - insert: "Foo" - } - ] - }, + delete: [116; 116), + insert: "Foo", kind: EnumVariant, detail: "()", documentation: Documentation( 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 0d2390eb2..70ea96e1b 100644 --- a/crates/ra_ide_api/src/completion/snapshots/completion_item__enum_variant_with_details.snap +++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__enum_variant_with_details.snap @@ -1,5 +1,5 @@ --- -created: "2019-02-18T09:10:52.039179076Z" +created: "2019-02-18T09:22:24.062138085Z" creator: insta@0.6.2 source: crates/ra_ide_api/src/completion/completion_item.rs expression: kind_completions @@ -8,14 +8,8 @@ expression: kind_completions CompletionItem { label: "Bar", source_range: [180; 180), - text_edit: TextEdit { - atoms: [ - AtomTextEdit { - delete: [180; 180), - insert: "Bar" - } - ] - }, + delete: [180; 180), + insert: "Bar", kind: EnumVariant, detail: "(i32, u32)", documentation: Documentation( @@ -25,14 +19,8 @@ expression: kind_completions CompletionItem { label: "Foo", source_range: [180; 180), - text_edit: TextEdit { - atoms: [ - AtomTextEdit { - delete: [180; 180), - insert: "Foo" - } - ] - }, + delete: [180; 180), + insert: "Foo", kind: EnumVariant, detail: "()", documentation: Documentation( @@ -42,14 +30,8 @@ expression: kind_completions CompletionItem { label: "S", source_range: [180; 180), - text_edit: TextEdit { - atoms: [ - AtomTextEdit { - delete: [180; 180), - insert: "S" - } - ] - }, + delete: [180; 180), + insert: "S", kind: EnumVariant, detail: "(S)" } 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 249b51311..0d36fd603 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,5 +1,5 @@ --- -created: "2019-02-18T09:10:52.097703010Z" +created: "2019-02-18T09:22:24.137183638Z" creator: insta@0.6.2 source: crates/ra_ide_api/src/completion/completion_item.rs expression: kind_completions @@ -8,14 +8,8 @@ expression: kind_completions CompletionItem { label: "other_crate", source_range: [4; 4), - text_edit: TextEdit { - atoms: [ - AtomTextEdit { - delete: [4; 4), - insert: "other_crate" - } - ] - }, + delete: [4; 4), + insert: "other_crate", 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 d73860e72..210e5a02d 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,5 +1,5 @@ --- -created: "2019-02-18T09:10:52.113095718Z" +created: "2019-02-18T09:22:24.143253235Z" creator: insta@0.6.2 source: crates/ra_ide_api/src/completion/completion_item.rs expression: kind_completions @@ -8,27 +8,15 @@ expression: kind_completions CompletionItem { label: "T", source_range: [44; 44), - text_edit: TextEdit { - atoms: [ - AtomTextEdit { - delete: [44; 44), - insert: "T" - } - ] - }, + delete: [44; 44), + insert: "T", kind: TypeParam }, CompletionItem { label: "quux", source_range: [44; 44), - text_edit: TextEdit { - atoms: [ - AtomTextEdit { - delete: [44; 44), - insert: "quux()$0" - } - ] - }, + delete: [44; 44), + insert: "quux()$0", kind: Function, 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 b75350f0e..ab8c30446 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,5 +1,5 @@ --- -created: "2019-02-18T09:10:52.117910091Z" +created: "2019-02-18T09:22:24.149424158Z" creator: insta@0.6.2 source: crates/ra_ide_api/src/completion/completion_item.rs expression: kind_completions @@ -8,27 +8,15 @@ expression: kind_completions CompletionItem { label: "T", source_range: [46; 46), - text_edit: TextEdit { - atoms: [ - AtomTextEdit { - delete: [46; 46), - insert: "T" - } - ] - }, + delete: [46; 46), + insert: "T", kind: TypeParam }, CompletionItem { label: "X", source_range: [46; 46), - text_edit: TextEdit { - atoms: [ - AtomTextEdit { - delete: [46; 46), - insert: "X" - } - ] - }, + delete: [46; 46), + insert: "X", 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 9a42b6c12..a4fc447b2 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,5 +1,5 @@ --- -created: "2019-02-18T09:10:52.160884429Z" +created: "2019-02-18T09:22:24.224510370Z" creator: insta@0.6.2 source: crates/ra_ide_api/src/completion/completion_item.rs expression: kind_completions @@ -8,28 +8,16 @@ expression: kind_completions CompletionItem { label: "main", source_range: [53; 56), - text_edit: TextEdit { - atoms: [ - AtomTextEdit { - delete: [53; 56), - insert: "main()$0" - } - ] - }, + delete: [53; 56), + insert: "main()$0", kind: Function, detail: "fn main()" }, CompletionItem { label: "no_args", source_range: [53; 56), - text_edit: TextEdit { - atoms: [ - AtomTextEdit { - delete: [53; 56), - insert: "no_args()$0" - } - ] - }, + delete: [53; 56), + insert: "no_args()$0", kind: Function, 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 5397a0bbe..b124355d5 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,5 +1,5 @@ --- -created: "2019-02-18T09:10:52.192876554Z" +created: "2019-02-18T09:22:24.267013140Z" creator: insta@0.6.2 source: crates/ra_ide_api/src/completion/completion_item.rs expression: kind_completions @@ -8,28 +8,16 @@ expression: kind_completions CompletionItem { label: "main", source_range: [72; 77), - text_edit: TextEdit { - atoms: [ - AtomTextEdit { - delete: [72; 77), - insert: "main()$0" - } - ] - }, + delete: [72; 77), + insert: "main()$0", kind: Function, detail: "fn main()" }, CompletionItem { label: "with_args", source_range: [72; 77), - text_edit: TextEdit { - atoms: [ - AtomTextEdit { - delete: [72; 77), - insert: "with_args($0)" - } - ] - }, + delete: [72; 77), + insert: "with_args($0)", kind: Function, 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 97c128dcb..fec729d48 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,5 +1,5 @@ --- -created: "2019-02-18T09:10:52.224275781Z" +created: "2019-02-18T09:22:24.303360770Z" creator: insta@0.6.2 source: crates/ra_ide_api/src/completion/completion_item.rs expression: kind_completions @@ -8,14 +8,8 @@ expression: kind_completions CompletionItem { label: "foo", source_range: [139; 140), - text_edit: TextEdit { - atoms: [ - AtomTextEdit { - delete: [139; 140), - insert: "foo()$0" - } - ] - }, + delete: [139; 140), + insert: "foo()$0", kind: Method, 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 18f1aa846..045e2a4e6 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,5 +1,5 @@ --- -created: "2019-02-18T09:10:51.982940400Z" +created: "2019-02-18T09:22:23.987788720Z" creator: insta@0.6.2 source: crates/ra_ide_api/src/completion/completion_item.rs expression: kind_completions @@ -8,66 +8,36 @@ expression: kind_completions CompletionItem { label: "if", source_range: [41; 41), - text_edit: TextEdit { - atoms: [ - AtomTextEdit { - delete: [41; 41), - insert: "if $0 {}" - } - ] - }, + delete: [41; 41), + insert: "if $0 {}", kind: Keyword }, CompletionItem { label: "loop", source_range: [41; 41), - text_edit: TextEdit { - atoms: [ - AtomTextEdit { - delete: [41; 41), - insert: "loop {$0}" - } - ] - }, + delete: [41; 41), + insert: "loop {$0}", kind: Keyword }, CompletionItem { label: "match", source_range: [41; 41), - text_edit: TextEdit { - atoms: [ - AtomTextEdit { - delete: [41; 41), - insert: "match $0 {}" - } - ] - }, + delete: [41; 41), + insert: "match $0 {}", kind: Keyword }, CompletionItem { label: "return", source_range: [41; 41), - text_edit: TextEdit { - atoms: [ - AtomTextEdit { - delete: [41; 41), - insert: "return;" - } - ] - }, + delete: [41; 41), + insert: "return;", kind: Keyword }, CompletionItem { label: "while", source_range: [41; 41), - text_edit: TextEdit { - atoms: [ - AtomTextEdit { - delete: [41; 41), - insert: "while $0 {}" - } - ] - }, + delete: [41; 41), + insert: "while $0 {}", 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 07e673852..b08efa522 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,5 +1,5 @@ --- -created: "2019-02-18T09:10:51.986894362Z" +created: "2019-02-18T09:22:23.984740354Z" creator: insta@0.6.2 source: crates/ra_ide_api/src/completion/completion_item.rs expression: kind_completions @@ -8,92 +8,50 @@ expression: kind_completions CompletionItem { label: "else", source_range: [92; 92), - text_edit: TextEdit { - atoms: [ - AtomTextEdit { - delete: [92; 92), - insert: "else {$0}" - } - ] - }, + delete: [92; 92), + insert: "else {$0}", kind: Keyword }, CompletionItem { label: "else if", source_range: [92; 92), - text_edit: TextEdit { - atoms: [ - AtomTextEdit { - delete: [92; 92), - insert: "else if $0 {}" - } - ] - }, + delete: [92; 92), + insert: "else if $0 {}", kind: Keyword }, CompletionItem { label: "if", source_range: [92; 92), - text_edit: TextEdit { - atoms: [ - AtomTextEdit { - delete: [92; 92), - insert: "if $0 {}" - } - ] - }, + delete: [92; 92), + insert: "if $0 {}", kind: Keyword }, CompletionItem { label: "loop", source_range: [92; 92), - text_edit: TextEdit { - atoms: [ - AtomTextEdit { - delete: [92; 92), - insert: "loop {$0}" - } - ] - }, + delete: [92; 92), + insert: "loop {$0}", kind: Keyword }, CompletionItem { label: "match", source_range: [92; 92), - text_edit: TextEdit { - atoms: [ - AtomTextEdit { - delete: [92; 92), - insert: "match $0 {}" - } - ] - }, + delete: [92; 92), + insert: "match $0 {}", kind: Keyword }, CompletionItem { label: "return", source_range: [92; 92), - text_edit: TextEdit { - atoms: [ - AtomTextEdit { - delete: [92; 92), - insert: "return;" - } - ] - }, + delete: [92; 92), + insert: "return;", kind: Keyword }, CompletionItem { label: "while", source_range: [92; 92), - text_edit: TextEdit { - atoms: [ - AtomTextEdit { - delete: [92; 92), - insert: "while $0 {}" - } - ] - }, + delete: [92; 92), + insert: "while $0 {}", 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 a31881175..e2b9214fb 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,5 +1,5 @@ --- -created: "2019-02-18T09:10:52.010821546Z" +created: "2019-02-18T09:22:24.049699338Z" creator: insta@0.6.2 source: crates/ra_ide_api/src/completion/completion_item.rs expression: kind_completions @@ -8,66 +8,36 @@ expression: kind_completions CompletionItem { label: "if", source_range: [48; 48), - text_edit: TextEdit { - atoms: [ - AtomTextEdit { - delete: [48; 48), - insert: "if $0 {}" - } - ] - }, + delete: [48; 48), + insert: "if $0 {}", kind: Keyword }, CompletionItem { label: "loop", source_range: [48; 48), - text_edit: TextEdit { - atoms: [ - AtomTextEdit { - delete: [48; 48), - insert: "loop {$0}" - } - ] - }, + delete: [48; 48), + insert: "loop {$0}", kind: Keyword }, CompletionItem { label: "match", source_range: [48; 48), - text_edit: TextEdit { - atoms: [ - AtomTextEdit { - delete: [48; 48), - insert: "match $0 {}" - } - ] - }, + delete: [48; 48), + insert: "match $0 {}", kind: Keyword }, CompletionItem { label: "return", source_range: [48; 48), - text_edit: TextEdit { - atoms: [ - AtomTextEdit { - delete: [48; 48), - insert: "return $0;" - } - ] - }, + delete: [48; 48), + insert: "return $0;", kind: Keyword }, CompletionItem { label: "while", source_range: [48; 48), - text_edit: TextEdit { - atoms: [ - AtomTextEdit { - delete: [48; 48), - insert: "while $0 {}" - } - ] - }, + delete: [48; 48), + insert: "while $0 {}", 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 8e66260f6..1ea7eb5ce 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,5 +1,5 @@ --- -created: "2019-02-18T09:10:52.039207401Z" +created: "2019-02-18T09:22:24.090949782Z" creator: insta@0.6.2 source: crates/ra_ide_api/src/completion/completion_item.rs expression: kind_completions @@ -8,66 +8,36 @@ expression: kind_completions CompletionItem { label: "if", source_range: [41; 41), - text_edit: TextEdit { - atoms: [ - AtomTextEdit { - delete: [41; 41), - insert: "if $0 {}" - } - ] - }, + delete: [41; 41), + insert: "if $0 {}", kind: Keyword }, CompletionItem { label: "loop", source_range: [41; 41), - text_edit: TextEdit { - atoms: [ - AtomTextEdit { - delete: [41; 41), - insert: "loop {$0}" - } - ] - }, + delete: [41; 41), + insert: "loop {$0}", kind: Keyword }, CompletionItem { label: "match", source_range: [41; 41), - text_edit: TextEdit { - atoms: [ - AtomTextEdit { - delete: [41; 41), - insert: "match $0 {}" - } - ] - }, + delete: [41; 41), + insert: "match $0 {}", kind: Keyword }, CompletionItem { label: "return", source_range: [41; 41), - text_edit: TextEdit { - atoms: [ - AtomTextEdit { - delete: [41; 41), - insert: "return;" - } - ] - }, + delete: [41; 41), + insert: "return;", kind: Keyword }, CompletionItem { label: "while", source_range: [41; 41), - text_edit: TextEdit { - atoms: [ - AtomTextEdit { - delete: [41; 41), - insert: "while $0 {}" - } - ] - }, + delete: [41; 41), + insert: "while $0 {}", 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 facd37bd9..76d5daf55 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,5 +1,5 @@ --- -created: "2019-02-18T09:10:51.979744931Z" +created: "2019-02-18T09:22:23.988755424Z" creator: insta@0.6.2 source: crates/ra_ide_api/src/completion/completion_item.rs expression: kind_completions @@ -8,40 +8,22 @@ expression: kind_completions CompletionItem { label: "crate", source_range: [17; 17), - text_edit: TextEdit { - atoms: [ - AtomTextEdit { - delete: [17; 17), - insert: "crate::" - } - ] - }, + delete: [17; 17), + insert: "crate::", kind: Keyword }, CompletionItem { label: "self", source_range: [17; 17), - text_edit: TextEdit { - atoms: [ - AtomTextEdit { - delete: [17; 17), - insert: "self" - } - ] - }, + delete: [17; 17), + insert: "self", kind: Keyword }, CompletionItem { label: "super", source_range: [17; 17), - text_edit: TextEdit { - atoms: [ - AtomTextEdit { - delete: [17; 17), - insert: "super::" - } - ] - }, + delete: [17; 17), + insert: "super::", 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 7a9792b0e..ee8bf4ca1 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,5 +1,5 @@ --- -created: "2019-02-18T09:10:52.008665355Z" +created: "2019-02-18T09:22:24.030382527Z" creator: insta@0.6.2 source: crates/ra_ide_api/src/completion/completion_item.rs expression: kind_completions @@ -8,27 +8,15 @@ expression: kind_completions CompletionItem { label: "self", source_range: [20; 20), - text_edit: TextEdit { - atoms: [ - AtomTextEdit { - delete: [20; 20), - insert: "self" - } - ] - }, + delete: [20; 20), + insert: "self", kind: Keyword }, CompletionItem { label: "super", source_range: [20; 20), - text_edit: TextEdit { - atoms: [ - AtomTextEdit { - delete: [20; 20), - insert: "super::" - } - ] - }, + delete: [20; 20), + insert: "super::", 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 9f0731aa1..b44db276e 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,5 +1,5 @@ --- -created: "2019-02-18T09:10:52.032133616Z" +created: "2019-02-18T09:22:24.073607133Z" creator: insta@0.6.2 source: crates/ra_ide_api/src/completion/completion_item.rs expression: kind_completions @@ -8,27 +8,15 @@ expression: kind_completions CompletionItem { label: "self", source_range: [24; 24), - text_edit: TextEdit { - atoms: [ - AtomTextEdit { - delete: [24; 24), - insert: "self" - } - ] - }, + delete: [24; 24), + insert: "self", kind: Keyword }, CompletionItem { label: "super", source_range: [24; 24), - text_edit: TextEdit { - atoms: [ - AtomTextEdit { - delete: [24; 24), - insert: "super::" - } - ] - }, + delete: [24; 24), + insert: "super::", 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 7d90ef4f3..f220d35c2 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,5 +1,5 @@ --- -created: "2019-02-18T09:10:51.985317165Z" +created: "2019-02-18T09:22:23.989188654Z" creator: insta@0.6.2 source: crates/ra_ide_api/src/completion/completion_item.rs expression: kind_completions @@ -8,66 +8,36 @@ expression: kind_completions CompletionItem { label: "if", source_range: [83; 83), - text_edit: TextEdit { - atoms: [ - AtomTextEdit { - delete: [83; 83), - insert: "if $0 {}" - } - ] - }, + delete: [83; 83), + insert: "if $0 {}", kind: Keyword }, CompletionItem { label: "loop", source_range: [83; 83), - text_edit: TextEdit { - atoms: [ - AtomTextEdit { - delete: [83; 83), - insert: "loop {$0}" - } - ] - }, + delete: [83; 83), + insert: "loop {$0}", kind: Keyword }, CompletionItem { label: "match", source_range: [83; 83), - text_edit: TextEdit { - atoms: [ - AtomTextEdit { - delete: [83; 83), - insert: "match $0 {}" - } - ] - }, + delete: [83; 83), + insert: "match $0 {}", kind: Keyword }, CompletionItem { label: "return", source_range: [83; 83), - text_edit: TextEdit { - atoms: [ - AtomTextEdit { - delete: [83; 83), - insert: "return $0;" - } - ] - }, + delete: [83; 83), + insert: "return $0;", kind: Keyword }, CompletionItem { label: "while", source_range: [83; 83), - text_edit: TextEdit { - atoms: [ - AtomTextEdit { - delete: [83; 83), - insert: "while $0 {}" - } - ] - }, + delete: [83; 83), + insert: "while $0 {}", 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 94e3a2dcb..d2093acdf 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,5 +1,5 @@ --- -created: "2019-02-18T09:10:52.013549824Z" +created: "2019-02-18T09:22:24.036383875Z" creator: insta@0.6.2 source: crates/ra_ide_api/src/completion/completion_item.rs expression: kind_completions @@ -8,66 +8,36 @@ expression: kind_completions CompletionItem { label: "if", source_range: [83; 83), - text_edit: TextEdit { - atoms: [ - AtomTextEdit { - delete: [83; 83), - insert: "if $0 {}" - } - ] - }, + delete: [83; 83), + insert: "if $0 {}", kind: Keyword }, CompletionItem { label: "loop", source_range: [83; 83), - text_edit: TextEdit { - atoms: [ - AtomTextEdit { - delete: [83; 83), - insert: "loop {$0}" - } - ] - }, + delete: [83; 83), + insert: "loop {$0}", kind: Keyword }, CompletionItem { label: "match", source_range: [83; 83), - text_edit: TextEdit { - atoms: [ - AtomTextEdit { - delete: [83; 83), - insert: "match $0 {}" - } - ] - }, + delete: [83; 83), + insert: "match $0 {}", kind: Keyword }, CompletionItem { label: "return", source_range: [83; 83), - text_edit: TextEdit { - atoms: [ - AtomTextEdit { - delete: [83; 83), - insert: "return $0;" - } - ] - }, + delete: [83; 83), + insert: "return $0;", kind: Keyword }, CompletionItem { label: "while", source_range: [83; 83), - text_edit: TextEdit { - atoms: [ - AtomTextEdit { - delete: [83; 83), - insert: "while $0 {}" - } - ] - }, + delete: [83; 83), + insert: "while $0 {}", kind: Keyword } ] diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__method_attr_filtering.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__method_attr_filtering.snap index 9e4062641..ce8af2159 100644 --- a/crates/ra_ide_api/src/completion/snapshots/completion_item__method_attr_filtering.snap +++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__method_attr_filtering.snap @@ -1,5 +1,5 @@ --- -created: "2019-02-18T09:10:51.944926087Z" +created: "2019-02-18T09:22:23.941335305Z" creator: insta@0.6.2 source: crates/ra_ide_api/src/completion/completion_item.rs expression: kind_completions @@ -8,14 +8,8 @@ expression: kind_completions CompletionItem { label: "the_method", source_range: [249; 249), - text_edit: TextEdit { - atoms: [ - AtomTextEdit { - delete: [249; 249), - insert: "the_method()$0" - } - ] - }, + delete: [249; 249), + insert: "the_method()$0", kind: Method, detail: "fn the_method(&self)" } diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__method_completion.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__method_completion.snap index f8b142b71..41a10de14 100644 --- a/crates/ra_ide_api/src/completion/snapshots/completion_item__method_completion.snap +++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__method_completion.snap @@ -1,5 +1,5 @@ --- -created: "2019-02-18T09:10:51.944760801Z" +created: "2019-02-18T09:22:23.939676100Z" creator: insta@0.6.2 source: crates/ra_ide_api/src/completion/completion_item.rs expression: kind_completions @@ -8,14 +8,8 @@ expression: kind_completions CompletionItem { label: "the_method", source_range: [144; 144), - text_edit: TextEdit { - atoms: [ - AtomTextEdit { - delete: [144; 144), - insert: "the_method()$0" - } - ] - }, + delete: [144; 144), + insert: "the_method()$0", kind: Method, detail: "fn the_method(&self)" } 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 670803b6f..1da3c3ba2 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,5 +1,5 @@ --- -created: "2019-02-18T09:10:52.036530210Z" +created: "2019-02-18T09:22:24.066918191Z" creator: insta@0.6.2 source: crates/ra_ide_api/src/completion/completion_item.rs expression: kind_completions @@ -8,14 +8,8 @@ expression: kind_completions CompletionItem { label: "my", source_range: [23; 25), - text_edit: TextEdit { - atoms: [ - AtomTextEdit { - delete: [23; 25), - insert: "my" - } - ] - }, + delete: [23; 25), + insert: "my", kind: Module, documentation: Documentation( "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 d082a9c2f..86bc8679d 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,5 +1,5 @@ --- -created: "2019-02-18T09:10:52.120932427Z" +created: "2019-02-18T09:22:24.161888678Z" creator: insta@0.6.2 source: crates/ra_ide_api/src/completion/completion_item.rs expression: kind_completions @@ -8,40 +8,22 @@ expression: kind_completions CompletionItem { label: "Baz", source_range: [89; 89), - text_edit: TextEdit { - atoms: [ - AtomTextEdit { - delete: [89; 89), - insert: "Baz" - } - ] - }, + delete: [89; 89), + insert: "Baz", kind: Enum }, CompletionItem { label: "Foo", source_range: [89; 89), - text_edit: TextEdit { - atoms: [ - AtomTextEdit { - delete: [89; 89), - insert: "Foo" - } - ] - }, + delete: [89; 89), + insert: "Foo", kind: Struct }, CompletionItem { label: "quux", source_range: [89; 89), - text_edit: TextEdit { - atoms: [ - AtomTextEdit { - delete: [89; 89), - insert: "quux()$0" - } - ] - }, + delete: [89; 89), + insert: "quux()$0", kind: Function, 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 daa3026fa..9f796b7ca 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,5 +1,5 @@ --- -created: "2019-02-18T09:10:52.120931050Z" +created: "2019-02-18T09:22:24.180517419Z" creator: insta@0.6.2 source: crates/ra_ide_api/src/completion/completion_item.rs expression: kind_completions @@ -8,27 +8,15 @@ expression: kind_completions CompletionItem { label: "Bar", source_range: [101; 101), - text_edit: TextEdit { - atoms: [ - AtomTextEdit { - delete: [101; 101), - insert: "Bar" - } - ] - }, + delete: [101; 101), + insert: "Bar", kind: Struct }, CompletionItem { label: "quux", source_range: [101; 101), - text_edit: TextEdit { - atoms: [ - AtomTextEdit { - delete: [101; 101), - insert: "quux()$0" - } - ] - }, + delete: [101; 101), + insert: "quux()$0", kind: Function, 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 0536d2cd5..4920e500e 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,5 +1,5 @@ --- -created: "2019-02-18T09:10:52.039178133Z" +created: "2019-02-18T09:22:24.085605313Z" creator: insta@0.6.2 source: crates/ra_ide_api/src/completion/completion_item.rs expression: kind_completions @@ -8,27 +8,15 @@ expression: kind_completions CompletionItem { label: "Spam", source_range: [12; 14), - text_edit: TextEdit { - atoms: [ - AtomTextEdit { - delete: [12; 14), - insert: "Spam" - } - ] - }, + delete: [12; 14), + insert: "Spam", kind: Struct }, CompletionItem { label: "foo", source_range: [12; 14), - text_edit: TextEdit { - atoms: [ - AtomTextEdit { - delete: [12; 14), - insert: "foo" - } - ] - }, + delete: [12; 14), + insert: "foo", 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 42f736d74..038e7f402 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,5 +1,5 @@ --- -created: "2019-02-18T09:10:51.988658363Z" +created: "2019-02-18T09:22:23.999953358Z" creator: insta@0.6.2 source: crates/ra_ide_api/src/completion/completion_item.rs expression: kind_completions @@ -8,92 +8,50 @@ expression: kind_completions CompletionItem { label: "break", source_range: [106; 108), - text_edit: TextEdit { - atoms: [ - AtomTextEdit { - delete: [106; 108), - insert: "break" - } - ] - }, + delete: [106; 108), + insert: "break", kind: Keyword }, CompletionItem { label: "continue", source_range: [106; 108), - text_edit: TextEdit { - atoms: [ - AtomTextEdit { - delete: [106; 108), - insert: "continue" - } - ] - }, + delete: [106; 108), + insert: "continue", kind: Keyword }, CompletionItem { label: "if", source_range: [106; 108), - text_edit: TextEdit { - atoms: [ - AtomTextEdit { - delete: [106; 108), - insert: "if $0 {}" - } - ] - }, + delete: [106; 108), + insert: "if $0 {}", kind: Keyword }, CompletionItem { label: "loop", source_range: [106; 108), - text_edit: TextEdit { - atoms: [ - AtomTextEdit { - delete: [106; 108), - insert: "loop {$0}" - } - ] - }, + delete: [106; 108), + insert: "loop {$0}", kind: Keyword }, CompletionItem { label: "match", source_range: [106; 108), - text_edit: TextEdit { - atoms: [ - AtomTextEdit { - delete: [106; 108), - insert: "match $0 {}" - } - ] - }, + delete: [106; 108), + insert: "match $0 {}", kind: Keyword }, CompletionItem { label: "return", source_range: [106; 108), - text_edit: TextEdit { - atoms: [ - AtomTextEdit { - delete: [106; 108), - insert: "return" - } - ] - }, + delete: [106; 108), + insert: "return", kind: Keyword }, CompletionItem { label: "while", source_range: [106; 108), - text_edit: TextEdit { - atoms: [ - AtomTextEdit { - delete: [106; 108), - insert: "while $0 {}" - } - ] - }, + delete: [106; 108), + insert: "while $0 {}", kind: Keyword } ] diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__param_completion_last_param.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__param_completion_last_param.snap index 0c651f26e..cab77f5a2 100644 --- a/crates/ra_ide_api/src/completion/snapshots/completion_item__param_completion_last_param.snap +++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__param_completion_last_param.snap @@ -1,5 +1,5 @@ --- -created: "2019-02-18T09:10:51.951199574Z" +created: "2019-02-18T09:22:23.949634602Z" creator: insta@0.6.2 source: crates/ra_ide_api/src/completion/completion_item.rs expression: kind_completions @@ -8,14 +8,8 @@ expression: kind_completions CompletionItem { label: "file_id: FileId", source_range: [98; 102), - text_edit: TextEdit { - atoms: [ - AtomTextEdit { - delete: [98; 102), - insert: "file_id: FileId" - } - ] - }, + delete: [98; 102), + insert: "file_id: FileId", lookup: "file_id" } ] diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__param_completion_nth_param.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__param_completion_nth_param.snap index 1064e28c5..8fbee160c 100644 --- a/crates/ra_ide_api/src/completion/snapshots/completion_item__param_completion_nth_param.snap +++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__param_completion_nth_param.snap @@ -1,5 +1,5 @@ --- -created: "2019-02-18T09:10:51.951199556Z" +created: "2019-02-18T09:22:23.949634355Z" creator: insta@0.6.2 source: crates/ra_ide_api/src/completion/completion_item.rs expression: kind_completions @@ -8,14 +8,8 @@ expression: kind_completions CompletionItem { label: "file_id: FileId", source_range: [98; 102), - text_edit: TextEdit { - atoms: [ - AtomTextEdit { - delete: [98; 102), - insert: "file_id: FileId" - } - ] - }, + delete: [98; 102), + insert: "file_id: FileId", lookup: "file_id" } ] diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__param_completion_trait_param.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__param_completion_trait_param.snap index 548c0c9ce..76eeadb6d 100644 --- a/crates/ra_ide_api/src/completion/snapshots/completion_item__param_completion_trait_param.snap +++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__param_completion_trait_param.snap @@ -1,5 +1,5 @@ --- -created: "2019-02-18T09:10:51.973234775Z" +created: "2019-02-18T09:22:23.974417169Z" creator: insta@0.6.2 source: crates/ra_ide_api/src/completion/completion_item.rs expression: kind_completions @@ -8,14 +8,8 @@ expression: kind_completions CompletionItem { label: "file_id: FileId", source_range: [269; 273), - text_edit: TextEdit { - atoms: [ - AtomTextEdit { - delete: [269; 273), - insert: "file_id: FileId" - } - ] - }, + delete: [269; 273), + insert: "file_id: FileId", lookup: "file_id" } ] 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 fcca19b77..2b5435f0c 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,5 +1,5 @@ --- -created: "2019-02-18T09:10:52.087222569Z" +created: "2019-02-18T09:22:24.127119709Z" creator: insta@0.6.2 source: crates/ra_ide_api/src/completion/completion_item.rs expression: kind_completions @@ -8,92 +8,50 @@ expression: kind_completions CompletionItem { label: "dbg", source_range: [76; 76), - text_edit: TextEdit { - atoms: [ - AtomTextEdit { - delete: [72; 76), - insert: "dbg!(bar)" - } - ] - }, + delete: [72; 76), + insert: "dbg!(bar)", detail: "dbg!(expr)" }, CompletionItem { label: "if", source_range: [76; 76), - text_edit: TextEdit { - atoms: [ - AtomTextEdit { - delete: [72; 76), - insert: "if bar {$0}" - } - ] - }, + delete: [72; 76), + insert: "if bar {$0}", detail: "if expr {}" }, CompletionItem { label: "match", source_range: [76; 76), - text_edit: TextEdit { - atoms: [ - AtomTextEdit { - delete: [72; 76), - insert: "match bar {\n${1:_} => {$0\\},\n}" - } - ] - }, + delete: [72; 76), + insert: "match bar {\n${1:_} => {$0\\},\n}", detail: "match expr {}" }, CompletionItem { label: "not", source_range: [76; 76), - text_edit: TextEdit { - atoms: [ - AtomTextEdit { - delete: [72; 76), - insert: "!bar" - } - ] - }, + delete: [72; 76), + insert: "!bar", detail: "!expr" }, CompletionItem { label: "ref", source_range: [76; 76), - text_edit: TextEdit { - atoms: [ - AtomTextEdit { - delete: [72; 76), - insert: "&bar" - } - ] - }, + delete: [72; 76), + insert: "&bar", detail: "&expr" }, CompletionItem { label: "refm", source_range: [76; 76), - text_edit: TextEdit { - atoms: [ - AtomTextEdit { - delete: [72; 76), - insert: "&mut bar" - } - ] - }, + delete: [72; 76), + insert: "&mut bar", detail: "&mut expr" }, CompletionItem { label: "while", source_range: [76; 76), - text_edit: TextEdit { - atoms: [ - AtomTextEdit { - delete: [72; 76), - insert: "while bar {\n$0\n}" - } - ] - }, + delete: [72; 76), + insert: "while bar {\n$0\n}", 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 954d1b4bc..0738cf466 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,5 +1,5 @@ --- -created: "2019-02-18T09:10:52.125606324Z" +created: "2019-02-18T09:22:24.182964414Z" creator: insta@0.6.2 source: crates/ra_ide_api/src/completion/completion_item.rs expression: kind_completions @@ -8,27 +8,15 @@ expression: kind_completions CompletionItem { label: "Foo", source_range: [47; 47), - text_edit: TextEdit { - atoms: [ - AtomTextEdit { - delete: [47; 47), - insert: "Foo" - } - ] - }, + delete: [47; 47), + insert: "Foo", kind: Struct }, CompletionItem { label: "x", source_range: [47; 47), - text_edit: TextEdit { - atoms: [ - AtomTextEdit { - delete: [47; 47), - insert: "x()$0" - } - ] - }, + delete: [47; 47), + insert: "x()$0", kind: Function, 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 3a88b7fbc..baf12cae1 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,5 +1,5 @@ --- -created: "2019-02-18T09:10:52.129525933Z" +created: "2019-02-18T09:22:24.174038680Z" creator: insta@0.6.2 source: crates/ra_ide_api/src/completion/completion_item.rs expression: kind_completions @@ -8,27 +8,15 @@ expression: kind_completions CompletionItem { label: "Self", source_range: [25; 25), - text_edit: TextEdit { - atoms: [ - AtomTextEdit { - delete: [25; 25), - insert: "Self" - } - ] - }, + delete: [25; 25), + insert: "Self", kind: TypeParam }, CompletionItem { label: "self", source_range: [25; 25), - text_edit: TextEdit { - atoms: [ - AtomTextEdit { - delete: [25; 25), - insert: "self" - } - ] - }, + delete: [25; 25), + insert: "self", 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 9bd6fe91d..fce2d6479 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,5 +1,5 @@ --- -created: "2019-02-18T09:10:52.156085697Z" +created: "2019-02-18T09:22:24.191576723Z" creator: insta@0.6.2 source: crates/ra_ide_api/src/completion/completion_item.rs expression: kind_completions @@ -8,27 +8,15 @@ expression: kind_completions CompletionItem { label: "pd", source_range: [17; 17), - text_edit: TextEdit { - atoms: [ - AtomTextEdit { - delete: [17; 17), - insert: "eprintln!(\"$0 = {:?}\", $0);" - } - ] - }, + delete: [17; 17), + insert: "eprintln!(\"$0 = {:?}\", $0);", kind: Snippet }, CompletionItem { label: "ppd", source_range: [17; 17), - text_edit: TextEdit { - atoms: [ - AtomTextEdit { - delete: [17; 17), - insert: "eprintln!(\"$0 = {:#?}\", $0);" - } - ] - }, + delete: [17; 17), + insert: "eprintln!(\"$0 = {:#?}\", $0);", 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 486b353ef..d2b1a5f0e 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,5 +1,5 @@ --- -created: "2019-02-18T09:10:52.152402422Z" +created: "2019-02-18T09:22:24.187670733Z" creator: insta@0.6.2 source: crates/ra_ide_api/src/completion/completion_item.rs expression: kind_completions @@ -8,28 +8,16 @@ expression: kind_completions CompletionItem { label: "Test function", source_range: [66; 66), - text_edit: TextEdit { - atoms: [ - AtomTextEdit { - delete: [66; 66), - insert: "#[test]\nfn ${1:feature}() {\n $0\n}" - } - ] - }, + delete: [66; 66), + insert: "#[test]\nfn ${1:feature}() {\n $0\n}", kind: Snippet, lookup: "tfn" }, CompletionItem { label: "pub(crate)", source_range: [66; 66), - text_edit: TextEdit { - atoms: [ - AtomTextEdit { - delete: [66; 66), - insert: "pub(crate) $0" - } - ] - }, + delete: [66; 66), + insert: "pub(crate) $0", 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 b34f6f26f..6ad4c5acc 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,5 +1,5 @@ --- -created: "2019-02-18T09:10:52.050659483Z" +created: "2019-02-18T09:22:24.093406123Z" creator: insta@0.6.2 source: crates/ra_ide_api/src/completion/completion_item.rs expression: kind_completions @@ -8,14 +8,8 @@ expression: kind_completions CompletionItem { label: "C", source_range: [107; 107), - text_edit: TextEdit { - atoms: [ - AtomTextEdit { - delete: [107; 107), - insert: "C" - } - ] - }, + delete: [107; 107), + insert: "C", kind: Const, detail: "const C: i32 = 42;", documentation: Documentation( 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 f6c95074a..163b325c3 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,5 +1,5 @@ --- -created: "2019-02-18T09:10:52.050659480Z" +created: "2019-02-18T09:22:24.093082839Z" creator: insta@0.6.2 source: crates/ra_ide_api/src/completion/completion_item.rs expression: kind_completions @@ -8,14 +8,8 @@ expression: kind_completions CompletionItem { label: "m", source_range: [100; 100), - text_edit: TextEdit { - atoms: [ - AtomTextEdit { - delete: [100; 100), - insert: "m()$0" - } - ] - }, + delete: [100; 100), + insert: "m()$0", kind: Method, detail: "fn m()", documentation: Documentation( 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 79168702c..583bda225 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,5 +1,5 @@ --- -created: "2019-02-18T09:10:52.066746177Z" +created: "2019-02-18T09:22:24.090876030Z" creator: insta@0.6.2 source: crates/ra_ide_api/src/completion/completion_item.rs expression: kind_completions @@ -8,14 +8,8 @@ expression: kind_completions CompletionItem { label: "T", source_range: [101; 101), - text_edit: TextEdit { - atoms: [ - AtomTextEdit { - delete: [101; 101), - insert: "T" - } - ] - }, + delete: [101; 101), + insert: "T", kind: TypeAlias, detail: "type T = i32;", documentation: Documentation( diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__struct_field_completion.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__struct_field_completion.snap index f22bbd987..58271b873 100644 --- a/crates/ra_ide_api/src/completion/snapshots/completion_item__struct_field_completion.snap +++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__struct_field_completion.snap @@ -1,5 +1,5 @@ --- -created: "2019-02-18T09:10:51.944776686Z" +created: "2019-02-18T09:22:23.939645902Z" creator: insta@0.6.2 source: crates/ra_ide_api/src/completion/completion_item.rs expression: kind_completions @@ -8,14 +8,8 @@ expression: kind_completions CompletionItem { label: "the_field", source_range: [85; 85), - text_edit: TextEdit { - atoms: [ - AtomTextEdit { - delete: [85; 85), - insert: "the_field" - } - ] - }, + delete: [85; 85), + insert: "the_field", kind: Field, detail: "u32" } 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 8b53d5e95..b38867b81 100644 --- a/crates/ra_ide_api/src/completion/snapshots/completion_item__struct_field_completion_autoderef.snap +++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__struct_field_completion_autoderef.snap @@ -1,5 +1,5 @@ --- -created: "2019-02-18T09:10:51.944780241Z" +created: "2019-02-18T09:22:23.940872916Z" creator: insta@0.6.2 source: crates/ra_ide_api/src/completion/completion_item.rs expression: kind_completions @@ -8,28 +8,16 @@ expression: kind_completions CompletionItem { label: "foo", source_range: [126; 126), - text_edit: TextEdit { - atoms: [ - AtomTextEdit { - delete: [126; 126), - insert: "foo()$0" - } - ] - }, + delete: [126; 126), + insert: "foo()$0", kind: Method, detail: "fn foo(&self)" }, CompletionItem { label: "the_field", source_range: [126; 126), - text_edit: TextEdit { - atoms: [ - AtomTextEdit { - delete: [126; 126), - insert: "the_field" - } - ] - }, + delete: [126; 126), + insert: "the_field", kind: Field, detail: "(u32, i32)" } 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 f20e4dcab..8e5cab43e 100644 --- a/crates/ra_ide_api/src/completion/snapshots/completion_item__struct_field_completion_self.snap +++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__struct_field_completion_self.snap @@ -1,5 +1,5 @@ --- -created: "2019-02-18T09:10:51.944941588Z" +created: "2019-02-18T09:22:23.940872918Z" creator: insta@0.6.2 source: crates/ra_ide_api/src/completion/completion_item.rs expression: kind_completions @@ -8,28 +8,16 @@ expression: kind_completions CompletionItem { label: "foo", source_range: [187; 187), - text_edit: TextEdit { - atoms: [ - AtomTextEdit { - delete: [187; 187), - insert: "foo()$0" - } - ] - }, + delete: [187; 187), + insert: "foo()$0", kind: Method, detail: "fn foo(self)" }, CompletionItem { label: "the_field", source_range: [187; 187), - text_edit: TextEdit { - atoms: [ - AtomTextEdit { - delete: [187; 187), - insert: "the_field" - } - ] - }, + delete: [187; 187), + insert: "the_field", kind: Field, detail: "(u32,)", documentation: Documentation( diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__tuple_field_completion.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__tuple_field_completion.snap index b1ebac40b..3f2780621 100644 --- a/crates/ra_ide_api/src/completion/snapshots/completion_item__tuple_field_completion.snap +++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__tuple_field_completion.snap @@ -1,5 +1,5 @@ --- -created: "2019-02-18T09:10:51.944941196Z" +created: "2019-02-18T09:22:23.939710971Z" creator: insta@0.6.2 source: crates/ra_ide_api/src/completion/completion_item.rs expression: kind_completions @@ -8,28 +8,16 @@ expression: kind_completions CompletionItem { label: "0", source_range: [75; 75), - text_edit: TextEdit { - atoms: [ - AtomTextEdit { - delete: [75; 75), - insert: "0" - } - ] - }, + delete: [75; 75), + insert: "0", kind: Field, detail: "i32" }, CompletionItem { label: "1", source_range: [75; 75), - text_edit: TextEdit { - atoms: [ - AtomTextEdit { - delete: [75; 75), - insert: "1" - } - ] - }, + delete: [75; 75), + insert: "1", kind: Field, detail: "f64" } 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 30a67db61..34e70c35d 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,5 +1,5 @@ --- -created: "2019-02-18T09:10:52.063155992Z" +created: "2019-02-18T09:22:24.098574884Z" creator: insta@0.6.2 source: crates/ra_ide_api/src/completion/completion_item.rs expression: kind_completions @@ -8,27 +8,15 @@ expression: kind_completions CompletionItem { label: "Spam", source_range: [11; 13), - text_edit: TextEdit { - atoms: [ - AtomTextEdit { - delete: [11; 13), - insert: "Spam" - } - ] - }, + delete: [11; 13), + insert: "Spam", kind: Struct }, CompletionItem { label: "foo", source_range: [11; 13), - text_edit: TextEdit { - atoms: [ - AtomTextEdit { - delete: [11; 13), - insert: "foo" - } - ] - }, + delete: [11; 13), + insert: "foo", 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 a8257ef12..d15f1905b 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,5 +1,5 @@ --- -created: "2019-02-18T09:10:52.075119580Z" +created: "2019-02-18T09:22:24.102063333Z" creator: insta@0.6.2 source: crates/ra_ide_api/src/completion/completion_item.rs expression: kind_completions @@ -8,14 +8,8 @@ expression: kind_completions CompletionItem { label: "Bar", source_range: [26; 26), - text_edit: TextEdit { - atoms: [ - AtomTextEdit { - delete: [26; 26), - insert: "Bar" - } - ] - }, + delete: [26; 26), + insert: "Bar", kind: Struct } ] -- cgit v1.2.3