From 864fd5ee25ea7b379855284365eb199cc0fa9c07 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Mon, 18 Feb 2019 10:31:00 +0300 Subject: More compact debug representation for completion --- .../ra_ide_api/src/completion/completion_item.rs | 37 +++- .../completion_item__bindings_from_for.snap | 35 +--- .../completion_item__bindings_from_if_let.snap | 46 +---- .../completion_item__bindings_from_let.snap | 46 +---- ...em__completes_break_and_continue_in_loops1.snap | 111 +++------- ...em__completes_break_and_continue_in_loops2.snap | 81 ++------ .../completion_item__completes_prelude.snap | 42 +--- ...on_item__completes_use_paths_across_crates.snap | 15 +- .../completion_item__deeply_nested_use_tree.snap | 17 +- ...t_add_semi_after_return_if_not_a_statement.snap | 81 ++------ ...ont_render_function_parens_if_already_call.snap | 34 +--- ...r_function_parens_if_already_call_assoc_fn.snap | 16 +- ...m__dont_render_function_parens_in_use_item.snap | 20 +- ...__dont_show_both_completions_for_shadowing.snap | 35 +--- .../snapshots/completion_item__enum_variant.snap | 48 ++--- ...completion_item__enum_variant_with_details.snap | 62 ++---- .../snapshots/completion_item__extern_prelude.snap | 17 +- .../snapshots/completion_item__generic_params.snap | 35 +--- .../completion_item__generic_params_in_struct.snap | 28 +-- ...n_item__inserts_parens_for_function_calls1.snap | 42 +--- ...n_item__inserts_parens_for_function_calls2.snap | 42 +--- ...n_item__inserts_parens_for_function_calls3.snap | 24 +-- .../completion_item__keywords_in_function1.snap | 81 ++------ .../completion_item__keywords_in_function2.snap | 111 +++------- .../completion_item__keywords_in_function3.snap | 81 ++------ .../completion_item__keywords_in_function4.snap | 81 ++------ .../completion_item__keywords_in_use_stmt1.snap | 47 +---- .../completion_item__keywords_in_use_stmt2.snap | 32 +-- .../completion_item__keywords_in_use_stmt3.snap | 32 +-- ...etion_item__last_return_in_block_has_semi1.snap | 81 ++------ ...etion_item__last_return_in_block_has_semi2.snap | 81 ++------ .../completion_item__method_attr_filtering.snap | 20 +- .../completion_item__method_completion.snap | 24 +-- .../snapshots/completion_item__mod_with_docs.snap | 24 +-- .../snapshots/completion_item__module_items.snap | 46 +---- ...etion_item__module_items_in_nested_modules.snap | 35 +--- .../completion_item__nested_use_tree.snap | 28 +-- ...item__no_semi_after_break_continue_in_expr.snap | 105 ++-------- ...mpletion_item__param_completion_last_param.snap | 17 +- ...ompletion_item__param_completion_nth_param.snap | 17 +- ...pletion_item__param_completion_trait_param.snap | 17 +- ...mpletion_works_for_trivial_path_expression.snap | 226 +++++++-------------- .../snapshots/completion_item__return_type.snap | 35 +--- .../completion_item__self_in_methods.snap | 28 +-- .../completion_item__snippets_in_expressions.snap | 36 +--- .../completion_item__snippets_in_items.snap | 39 +--- .../completion_item__struct_associated_const.snap | 23 +-- .../completion_item__struct_associated_method.snap | 27 +-- .../completion_item__struct_associated_type.snap | 23 +-- .../completion_item__struct_field_completion.snap | 20 +- ...on_item__struct_field_completion_autoderef.snap | 38 +--- ...pletion_item__struct_field_completion_self.snap | 45 ++-- .../completion_item__tuple_field_completion.snap | 34 +--- ...pletion_item__use_item_starting_with_crate.snap | 28 +-- ...mpletion_item__use_item_starting_with_self.snap | 17 +- 55 files changed, 610 insertions(+), 1883 deletions(-) (limited to 'crates/ra_ide_api/src') diff --git a/crates/ra_ide_api/src/completion/completion_item.rs b/crates/ra_ide_api/src/completion/completion_item.rs index ed0b0b7e5..7b93b5df8 100644 --- a/crates/ra_ide_api/src/completion/completion_item.rs +++ b/crates/ra_ide_api/src/completion/completion_item.rs @@ -1,7 +1,7 @@ +use std::fmt; + use hir::{Docs, Documentation, PerNs, Resolution}; -use ra_syntax::{ - TextRange, -}; +use ra_syntax::TextRange; use ra_text_edit::TextEdit; use test_utils::tested_by; @@ -15,16 +15,16 @@ use crate::completion::{ /// `CompletionItem` describes a single completion variant in the editor pop-up. /// It is basically a POD with various properties. To construct a /// `CompletionItem`, use `new` method and the `Builder` struct. -#[derive(Debug)] pub struct CompletionItem { /// Used only internally in tests, to check only specific kind of /// completion. + #[allow(unused)] completion_kind: CompletionKind, label: String, kind: Option, + lookup: Option, detail: Option, documentation: Option, - lookup: Option, insert_text: Option, insert_text_format: InsertTextFormat, /// Where completion occurs. `source_range` must contain the completion offset. @@ -36,6 +36,33 @@ pub struct CompletionItem { text_edit: Option, } +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()); + if let Some(kind) = self.kind().as_ref() { + s.field("kind", kind); + } + if self.lookup() != self.label() { + s.field("lookup", &self.lookup()); + } + if let Some(detail) = self.detail() { + s.field("detail", &detail); + } + if let Some(documentation) = self.documentation() { + s.field("documentation", &documentation); + } + if self.insert_text() != self.label() { + s.field("insert_text", &self.insert_text()) + .field("insert_text_format", &self.insert_text_format()); + } + if let Some(edit) = self.text_edit.as_ref() { + s.field("text_edit", edit); + } + s.finish() + } +} + #[derive(Debug, Clone, Copy, PartialEq, Eq)] pub enum CompletionItemKind { Snippet, 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 31df6565b..799daa724 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,40 +1,21 @@ --- -created: "2019-01-27T19:56:59.944446814+00:00" -creator: insta@0.5.2 -expression: kind_completions +created: "2019-02-18T07:29:59.736783986Z" +creator: insta@0.6.2 source: crates/ra_ide_api/src/completion/completion_item.rs +expression: kind_completions --- [ CompletionItem { - completion_kind: Reference, label: "quux", - kind: Some( - Function - ), - detail: Some( - "fn quux()" - ), - documentation: None, - lookup: None, - insert_text: Some( - "quux()$0" - ), - insert_text_format: Snippet, source_range: [83; 83), - text_edit: None + kind: Function, + detail: "fn quux()", + insert_text: "quux()$0", + insert_text_format: Snippet }, CompletionItem { - completion_kind: Reference, label: "x", - kind: Some( - Binding - ), - detail: None, - documentation: None, - lookup: None, - insert_text: None, - insert_text_format: PlainText, source_range: [83; 83), - text_edit: None + 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 9f37bae36..e6c1a936a 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,54 +1,26 @@ --- -created: "2019-01-27T19:56:59.946956414+00:00" -creator: insta@0.5.2 -expression: kind_completions +created: "2019-02-18T07:29:59.739513594Z" +creator: insta@0.6.2 source: crates/ra_ide_api/src/completion/completion_item.rs +expression: kind_completions --- [ CompletionItem { - completion_kind: Reference, label: "a", - kind: Some( - Binding - ), - detail: None, - documentation: None, - lookup: None, - insert_text: None, - insert_text_format: PlainText, source_range: [214; 214), - text_edit: None + kind: Binding }, CompletionItem { - completion_kind: Reference, label: "b", - kind: Some( - Binding - ), - detail: None, - documentation: None, - lookup: None, - insert_text: None, - insert_text_format: PlainText, source_range: [214; 214), - text_edit: None + kind: Binding }, CompletionItem { - completion_kind: Reference, label: "quux", - kind: Some( - Function - ), - detail: Some( - "fn quux()" - ), - documentation: None, - lookup: None, - insert_text: Some( - "quux()$0" - ), - insert_text_format: Snippet, source_range: [214; 214), - text_edit: None + kind: Function, + detail: "fn quux()", + insert_text: "quux()$0", + insert_text_format: Snippet } ] 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 f4808bc93..2b0da7d73 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,54 +1,26 @@ --- -created: "2019-01-27T19:56:59.948953759+00:00" -creator: insta@0.5.2 -expression: kind_completions +created: "2019-02-18T07:29:59.739513592Z" +creator: insta@0.6.2 source: crates/ra_ide_api/src/completion/completion_item.rs +expression: kind_completions --- [ CompletionItem { - completion_kind: Reference, label: "quux", - kind: Some( - Function - ), - detail: Some( - "fn quux(x: i32)" - ), - documentation: None, - lookup: None, - insert_text: Some( - "quux($0)" - ), - insert_text_format: Snippet, source_range: [79; 79), - text_edit: None + kind: Function, + detail: "fn quux(x: i32)", + insert_text: "quux($0)", + insert_text_format: Snippet }, CompletionItem { - completion_kind: Reference, label: "x", - kind: Some( - Binding - ), - detail: None, - documentation: None, - lookup: None, - insert_text: None, - insert_text_format: PlainText, source_range: [79; 79), - text_edit: None + kind: Binding }, CompletionItem { - completion_kind: Reference, label: "y", - kind: Some( - Binding - ), - detail: None, - documentation: None, - lookup: None, - insert_text: None, - insert_text_format: PlainText, source_range: [79; 79), - text_edit: None + 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 25ccbdb8f..5d62a6cb0 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,120 +1,57 @@ --- -created: "2019-01-27T19:56:59.913816522+00:00" -creator: insta@0.5.2 -expression: kind_completions +created: "2019-02-18T07:29:59.630948152Z" +creator: insta@0.6.2 source: crates/ra_ide_api/src/completion/completion_item.rs +expression: kind_completions --- [ CompletionItem { - completion_kind: Keyword, label: "break", - kind: Some( - Keyword - ), - detail: None, - documentation: None, - lookup: None, - insert_text: Some( - "break;" - ), - insert_text_format: Snippet, source_range: [55; 55), - text_edit: None + kind: Keyword, + insert_text: "break;", + insert_text_format: Snippet }, CompletionItem { - completion_kind: Keyword, label: "continue", - kind: Some( - Keyword - ), - detail: None, - documentation: None, - lookup: None, - insert_text: Some( - "continue;" - ), - insert_text_format: Snippet, source_range: [55; 55), - text_edit: None + kind: Keyword, + insert_text: "continue;", + insert_text_format: Snippet }, CompletionItem { - completion_kind: Keyword, label: "if", - kind: Some( - Keyword - ), - detail: None, - documentation: None, - lookup: None, - insert_text: Some( - "if $0 {}" - ), - insert_text_format: Snippet, source_range: [55; 55), - text_edit: None + kind: Keyword, + insert_text: "if $0 {}", + insert_text_format: Snippet }, CompletionItem { - completion_kind: Keyword, label: "loop", - kind: Some( - Keyword - ), - detail: None, - documentation: None, - lookup: None, - insert_text: Some( - "loop {$0}" - ), - insert_text_format: Snippet, source_range: [55; 55), - text_edit: None + kind: Keyword, + insert_text: "loop {$0}", + insert_text_format: Snippet }, CompletionItem { - completion_kind: Keyword, label: "match", - kind: Some( - Keyword - ), - detail: None, - documentation: None, - lookup: None, - insert_text: Some( - "match $0 {}" - ), - insert_text_format: Snippet, source_range: [55; 55), - text_edit: None + kind: Keyword, + insert_text: "match $0 {}", + insert_text_format: Snippet }, CompletionItem { - completion_kind: Keyword, label: "return", - kind: Some( - Keyword - ), - detail: None, - documentation: None, - lookup: None, - insert_text: Some( - "return $0;" - ), - insert_text_format: Snippet, source_range: [55; 55), - text_edit: None + kind: Keyword, + insert_text: "return $0;", + insert_text_format: Snippet }, CompletionItem { - completion_kind: Keyword, label: "while", - kind: Some( - Keyword - ), - detail: None, - documentation: None, - lookup: None, - insert_text: Some( - "while $0 {}" - ), - insert_text_format: Snippet, source_range: [55; 55), - text_edit: None + kind: Keyword, + insert_text: "while $0 {}", + insert_text_format: Snippet } ] 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 42a888e3a..aeedd0e80 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,88 +1,43 @@ --- -created: "2019-01-27T20:00:15.602646258+00:00" -creator: insta@0.5.2 -expression: kind_completions +created: "2019-02-18T07:29:59.662074625Z" +creator: insta@0.6.2 source: crates/ra_ide_api/src/completion/completion_item.rs +expression: kind_completions --- [ CompletionItem { - completion_kind: Keyword, label: "if", - kind: Some( - Keyword - ), - detail: None, - documentation: None, - lookup: None, - insert_text: Some( - "if $0 {}" - ), - insert_text_format: Snippet, source_range: [60; 60), - text_edit: None + kind: Keyword, + insert_text: "if $0 {}", + insert_text_format: Snippet }, CompletionItem { - completion_kind: Keyword, label: "loop", - kind: Some( - Keyword - ), - detail: None, - documentation: None, - lookup: None, - insert_text: Some( - "loop {$0}" - ), - insert_text_format: Snippet, source_range: [60; 60), - text_edit: None + kind: Keyword, + insert_text: "loop {$0}", + insert_text_format: Snippet }, CompletionItem { - completion_kind: Keyword, label: "match", - kind: Some( - Keyword - ), - detail: None, - documentation: None, - lookup: None, - insert_text: Some( - "match $0 {}" - ), - insert_text_format: Snippet, source_range: [60; 60), - text_edit: None + kind: Keyword, + insert_text: "match $0 {}", + insert_text_format: Snippet }, CompletionItem { - completion_kind: Keyword, label: "return", - kind: Some( - Keyword - ), - detail: None, - documentation: None, - lookup: None, - insert_text: Some( - "return $0;" - ), - insert_text_format: Snippet, source_range: [60; 60), - text_edit: None + kind: Keyword, + insert_text: "return $0;", + insert_text_format: Snippet }, CompletionItem { - completion_kind: Keyword, label: "while", - kind: Some( - Keyword - ), - detail: None, - documentation: None, - lookup: None, - insert_text: Some( - "while $0 {}" - ), - insert_text_format: Snippet, source_range: [60; 60), - text_edit: None + kind: Keyword, + insert_text: "while $0 {}", + insert_text_format: Snippet } ] 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 2b5a1a8ea..a22205dad 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,54 +1,26 @@ --- -created: "2019-02-13T19:52:43.734834624Z" +created: "2019-02-18T07:29:59.774580359Z" creator: insta@0.6.2 source: crates/ra_ide_api/src/completion/completion_item.rs expression: kind_completions --- [ CompletionItem { - completion_kind: Reference, label: "Option", - kind: Some( - Struct - ), - detail: None, - documentation: None, - lookup: None, - insert_text: None, - insert_text_format: PlainText, source_range: [18; 18), - text_edit: None + kind: Struct }, CompletionItem { - completion_kind: Reference, label: "foo", - kind: Some( - Function - ), - detail: Some( - "fn foo()" - ), - documentation: None, - lookup: None, - insert_text: Some( - "foo()$0" - ), - insert_text_format: Snippet, source_range: [18; 18), - text_edit: None + kind: Function, + detail: "fn foo()", + insert_text: "foo()$0", + insert_text_format: Snippet }, CompletionItem { - completion_kind: Reference, label: "std", - kind: Some( - Module - ), - detail: None, - documentation: None, - lookup: None, - insert_text: None, - insert_text_format: PlainText, source_range: [18; 18), - text_edit: None + 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 4b40fcf27..fcbb592e1 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,22 +1,13 @@ --- -created: "2019-02-11T11:53:02.410665254Z" -creator: insta@0.6.1 +created: "2019-02-18T07:29:59.729954589Z" +creator: insta@0.6.2 source: crates/ra_ide_api/src/completion/completion_item.rs expression: kind_completions --- [ CompletionItem { - completion_kind: Reference, label: "bar", - kind: Some( - Module - ), - detail: None, - documentation: None, - lookup: None, - insert_text: None, - insert_text_format: PlainText, source_range: [9; 9), - text_edit: None + 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 b55e24bdc..3c5460319 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,22 +1,13 @@ --- -created: "2019-01-22T14:45:00.719911400+00:00" -creator: insta@0.4.0 +created: "2019-02-18T07:29:59.663233766Z" +creator: insta@0.6.2 +source: crates/ra_ide_api/src/completion/completion_item.rs expression: kind_completions -source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs" --- [ CompletionItem { - completion_kind: Reference, label: "Spam", - kind: Some( - Struct - ), - detail: None, - documentation: None, - lookup: None, - insert_text: None, - insert_text_format: PlainText, source_range: [23; 25), - text_edit: None + 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 5e4ff6af8..493684e5b 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,88 +1,43 @@ --- -created: "2019-01-27T19:56:59.920190685+00:00" -creator: insta@0.5.2 -expression: kind_completions +created: "2019-02-18T07:29:59.637726929Z" +creator: insta@0.6.2 source: crates/ra_ide_api/src/completion/completion_item.rs +expression: kind_completions --- [ CompletionItem { - completion_kind: Keyword, label: "if", - kind: Some( - Keyword - ), - detail: None, - documentation: None, - lookup: None, - insert_text: Some( - "if $0 {}" - ), - insert_text_format: Snippet, source_range: [85; 85), - text_edit: None + kind: Keyword, + insert_text: "if $0 {}", + insert_text_format: Snippet }, CompletionItem { - completion_kind: Keyword, label: "loop", - kind: Some( - Keyword - ), - detail: None, - documentation: None, - lookup: None, - insert_text: Some( - "loop {$0}" - ), - insert_text_format: Snippet, source_range: [85; 85), - text_edit: None + kind: Keyword, + insert_text: "loop {$0}", + insert_text_format: Snippet }, CompletionItem { - completion_kind: Keyword, label: "match", - kind: Some( - Keyword - ), - detail: None, - documentation: None, - lookup: None, - insert_text: Some( - "match $0 {}" - ), - insert_text_format: Snippet, source_range: [85; 85), - text_edit: None + kind: Keyword, + insert_text: "match $0 {}", + insert_text_format: Snippet }, CompletionItem { - completion_kind: Keyword, label: "return", - kind: Some( - Keyword - ), - detail: None, - documentation: None, - lookup: None, - insert_text: Some( - "return $0" - ), - insert_text_format: Snippet, source_range: [85; 85), - text_edit: None + kind: Keyword, + insert_text: "return $0", + insert_text_format: Snippet }, CompletionItem { - completion_kind: Keyword, label: "while", - kind: Some( - Keyword - ), - detail: None, - documentation: None, - lookup: None, - insert_text: Some( - "while $0 {}" - ), - insert_text_format: Snippet, source_range: [85; 85), - text_edit: None + kind: Keyword, + insert_text: "while $0 {}", + insert_text_format: Snippet } ] 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 f4a04ecb3..4e37dbef1 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,40 +1,20 @@ --- -created: "2019-01-27T19:56:59.965130040+00:00" -creator: insta@0.5.2 -expression: kind_completions +created: "2019-02-18T07:29:59.812347626Z" +creator: insta@0.6.2 source: crates/ra_ide_api/src/completion/completion_item.rs +expression: kind_completions --- [ CompletionItem { - completion_kind: Reference, label: "frobnicate", - kind: Some( - Function - ), - detail: Some( - "fn frobnicate()" - ), - documentation: None, - lookup: None, - insert_text: None, - insert_text_format: PlainText, source_range: [35; 39), - text_edit: None + kind: Function, + detail: "fn frobnicate()" }, CompletionItem { - completion_kind: Reference, label: "main", - kind: Some( - Function - ), - detail: Some( - "fn main()" - ), - documentation: None, - lookup: None, - insert_text: None, - insert_text_format: PlainText, source_range: [35; 39), - text_edit: None + 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 18a187c6f..2ba9c82b0 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,24 +1,14 @@ --- -created: "2019-02-17T18:29:14.513213526Z" +created: "2019-02-18T07:29:59.843178841Z" creator: insta@0.6.2 source: crates/ra_ide_api/src/completion/completion_item.rs expression: kind_completions --- [ CompletionItem { - completion_kind: Reference, label: "new", - kind: Some( - Method - ), - detail: Some( - "fn new() -> Foo" - ), - documentation: None, - lookup: None, - insert_text: None, - insert_text_format: PlainText, source_range: [67; 69), - text_edit: None + 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 3bc3f5f38..c071ff198 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,24 +1,14 @@ --- -created: "2019-01-22T15:38:19.815217100+00:00" -creator: insta@0.4.0 +created: "2019-02-18T07:29:59.808400485Z" +creator: insta@0.6.2 +source: crates/ra_ide_api/src/completion/completion_item.rs expression: kind_completions -source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs" --- [ CompletionItem { - completion_kind: Reference, label: "foo", - kind: Some( - Function - ), - detail: Some( - "pub fn foo()" - ), - documentation: None, - lookup: None, - insert_text: None, - insert_text_format: PlainText, source_range: [40; 41), - text_edit: None + 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 8f8a3a56c..68bfbcdcd 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,40 +1,21 @@ --- -created: "2019-01-23T07:42:59.658375+00:00" -creator: insta@0.4.0 -expression: kind_completions +created: "2019-02-18T07:29:59.810202671Z" +creator: insta@0.6.2 source: crates/ra_ide_api/src/completion/completion_item.rs +expression: kind_completions --- [ CompletionItem { - completion_kind: Reference, label: "bar", - kind: Some( - Binding - ), - detail: None, - documentation: None, - lookup: None, - insert_text: None, - insert_text_format: PlainText, source_range: [129; 129), - text_edit: None + kind: Binding }, CompletionItem { - completion_kind: Reference, label: "foo", - kind: Some( - Function - ), - detail: Some( - "fn foo() ->" - ), - documentation: None, - lookup: None, - insert_text: Some( - "foo()$0" - ), - insert_text_format: Snippet, source_range: [129; 129), - text_edit: None + kind: Function, + detail: "fn foo() ->", + insert_text: "foo()$0", + insert_text_format: Snippet } ] 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 8ac58006e..b4a8443a0 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,48 +1,26 @@ --- -created: "2019-01-27T19:56:59.937030324+00:00" -creator: insta@0.5.2 -expression: kind_completions +created: "2019-02-18T07:29:59.672144115Z" +creator: insta@0.6.2 source: crates/ra_ide_api/src/completion/completion_item.rs +expression: kind_completions --- [ CompletionItem { - completion_kind: Reference, label: "Bar", - kind: Some( - EnumVariant - ), - detail: Some( - "(i32)" - ), - documentation: Some( - Documentation( - "Bar Variant with i32" - ) - ), - lookup: None, - insert_text: None, - insert_text_format: PlainText, source_range: [116; 116), - text_edit: None + kind: EnumVariant, + detail: "(i32)", + documentation: Documentation( + "Bar Variant with i32" + ) }, CompletionItem { - completion_kind: Reference, label: "Foo", - kind: Some( - EnumVariant - ), - detail: Some( - "()" - ), - documentation: Some( - Documentation( - "Foo Variant" - ) - ), - lookup: None, - insert_text: None, - insert_text_format: PlainText, source_range: [116; 116), - text_edit: None + kind: EnumVariant, + detail: "()", + documentation: Documentation( + "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 9fd2d81ec..8f6defc4f 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,64 +1,32 @@ --- -created: "2019-01-27T19:56:59.938973454+00:00" -creator: insta@0.5.2 -expression: kind_completions +created: "2019-02-18T07:29:59.686329490Z" +creator: insta@0.6.2 source: crates/ra_ide_api/src/completion/completion_item.rs +expression: kind_completions --- [ CompletionItem { - completion_kind: Reference, label: "Bar", - kind: Some( - EnumVariant - ), - detail: Some( - "(i32, u32)" - ), - documentation: Some( - Documentation( - "Bar Variant with i32 and u32" - ) - ), - lookup: None, - insert_text: None, - insert_text_format: PlainText, source_range: [180; 180), - text_edit: None + kind: EnumVariant, + detail: "(i32, u32)", + documentation: Documentation( + "Bar Variant with i32 and u32" + ) }, CompletionItem { - completion_kind: Reference, label: "Foo", - kind: Some( - EnumVariant - ), - detail: Some( - "()" - ), - documentation: Some( - Documentation( - "Foo Variant (empty)" - ) - ), - lookup: None, - insert_text: None, - insert_text_format: PlainText, source_range: [180; 180), - text_edit: None + kind: EnumVariant, + detail: "()", + documentation: Documentation( + "Foo Variant (empty)" + ) }, CompletionItem { - completion_kind: Reference, label: "S", - kind: Some( - EnumVariant - ), - detail: Some( - "(S)" - ), - documentation: None, - lookup: None, - insert_text: None, - insert_text_format: PlainText, source_range: [180; 180), - text_edit: None + 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 d0e3a6188..2a2959fd2 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,22 +1,13 @@ --- -created: "2019-02-04T21:08:32.615556587+00:00" -creator: insta@0.5.3 -expression: kind_completions +created: "2019-02-18T07:29:59.763042807Z" +creator: insta@0.6.2 source: crates/ra_ide_api/src/completion/completion_item.rs +expression: kind_completions --- [ CompletionItem { - completion_kind: Reference, label: "other_crate", - kind: Some( - Module - ), - detail: None, - documentation: None, - lookup: None, - insert_text: None, - insert_text_format: PlainText, source_range: [4; 4), - text_edit: None + 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 71cb55a5b..5e1a876da 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,40 +1,21 @@ --- -created: "2019-02-01T22:20:40.580128393+00:00" -creator: insta@0.5.3 -expression: kind_completions +created: "2019-02-18T07:29:59.765665697Z" +creator: insta@0.6.2 source: crates/ra_ide_api/src/completion/completion_item.rs +expression: kind_completions --- [ CompletionItem { - completion_kind: Reference, label: "T", - kind: Some( - TypeParam - ), - detail: None, - documentation: None, - lookup: None, - insert_text: None, - insert_text_format: PlainText, source_range: [44; 44), - text_edit: None + kind: TypeParam }, CompletionItem { - completion_kind: Reference, label: "quux", - kind: Some( - Function - ), - detail: Some( - "fn quux()" - ), - documentation: None, - lookup: None, - insert_text: Some( - "quux()$0" - ), - insert_text_format: Snippet, source_range: [44; 44), - text_edit: None + kind: Function, + detail: "fn quux()", + insert_text: "quux()$0", + insert_text_format: Snippet } ] 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 a35c0cd13..b0c9bff03 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,36 +1,18 @@ --- -created: "2019-02-01T22:23:21.508620224+00:00" -creator: insta@0.5.3 -expression: kind_completions +created: "2019-02-18T07:29:59.768275744Z" +creator: insta@0.6.2 source: crates/ra_ide_api/src/completion/completion_item.rs +expression: kind_completions --- [ CompletionItem { - completion_kind: Reference, label: "T", - kind: Some( - TypeParam - ), - detail: None, - documentation: None, - lookup: None, - insert_text: None, - insert_text_format: PlainText, source_range: [46; 46), - text_edit: None + kind: TypeParam }, CompletionItem { - completion_kind: Reference, label: "X", - kind: Some( - Struct - ), - detail: None, - documentation: None, - lookup: None, - insert_text: None, - insert_text_format: PlainText, source_range: [46; 46), - text_edit: None + 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 339df3c84..8ef0a4b7a 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,44 +1,24 @@ --- -created: "2019-01-27T19:56:59.965550827+00:00" -creator: insta@0.5.2 -expression: kind_completions +created: "2019-02-18T07:29:59.808403924Z" +creator: insta@0.6.2 source: crates/ra_ide_api/src/completion/completion_item.rs +expression: kind_completions --- [ CompletionItem { - completion_kind: Reference, label: "main", - kind: Some( - Function - ), - detail: Some( - "fn main()" - ), - documentation: None, - lookup: None, - insert_text: Some( - "main()$0" - ), - insert_text_format: Snippet, source_range: [53; 56), - text_edit: None + kind: Function, + detail: "fn main()", + insert_text: "main()$0", + insert_text_format: Snippet }, CompletionItem { - completion_kind: Reference, label: "no_args", - kind: Some( - Function - ), - detail: Some( - "fn no_args()" - ), - documentation: None, - lookup: None, - insert_text: Some( - "no_args()$0" - ), - insert_text_format: Snippet, source_range: [53; 56), - text_edit: None + kind: Function, + detail: "fn no_args()", + insert_text: "no_args()$0", + insert_text_format: Snippet } ] 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 c524f3587..32730639e 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,44 +1,24 @@ --- -created: "2019-01-22T15:38:19.996733+00:00" -creator: insta@0.4.0 +created: "2019-02-18T07:29:59.843178843Z" +creator: insta@0.6.2 +source: crates/ra_ide_api/src/completion/completion_item.rs expression: kind_completions -source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs" --- [ CompletionItem { - completion_kind: Reference, label: "main", - kind: Some( - Function - ), - detail: Some( - "fn main()" - ), - documentation: None, - lookup: None, - insert_text: Some( - "main()$0" - ), - insert_text_format: Snippet, source_range: [72; 77), - text_edit: None + kind: Function, + detail: "fn main()", + insert_text: "main()$0", + insert_text_format: Snippet }, CompletionItem { - completion_kind: Reference, label: "with_args", - kind: Some( - Function - ), - detail: Some( - "fn with_args(x: i32, y: String)" - ), - documentation: None, - lookup: None, - insert_text: Some( - "with_args($0)" - ), - insert_text_format: Snippet, source_range: [72; 77), - text_edit: None + kind: Function, + detail: "fn with_args(x: i32, y: String)", + insert_text: "with_args($0)", + insert_text_format: Snippet } ] 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 92068e50a..99f21b258 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,26 +1,16 @@ --- -created: "2019-01-23T13:19:23.525922020+00:00" -creator: insta@0.5.2 -expression: kind_completions +created: "2019-02-18T07:29:59.877573951Z" +creator: insta@0.6.2 source: crates/ra_ide_api/src/completion/completion_item.rs +expression: kind_completions --- [ CompletionItem { - completion_kind: Reference, label: "foo", - kind: Some( - Method - ), - detail: Some( - "fn foo(&self)" - ), - documentation: None, - lookup: None, - insert_text: Some( - "foo()$0" - ), - insert_text_format: Snippet, source_range: [139; 140), - text_edit: None + kind: Method, + detail: "fn foo(&self)", + insert_text: "foo()$0", + insert_text_format: Snippet } ] 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 874c41a02..022e3f6e9 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,88 +1,43 @@ --- -created: "2019-01-27T19:56:59.913826978+00:00" -creator: insta@0.5.2 -expression: kind_completions +created: "2019-02-18T07:29:59.639066512Z" +creator: insta@0.6.2 source: crates/ra_ide_api/src/completion/completion_item.rs +expression: kind_completions --- [ CompletionItem { - completion_kind: Keyword, label: "if", - kind: Some( - Keyword - ), - detail: None, - documentation: None, - lookup: None, - insert_text: Some( - "if $0 {}" - ), - insert_text_format: Snippet, source_range: [41; 41), - text_edit: None + kind: Keyword, + insert_text: "if $0 {}", + insert_text_format: Snippet }, CompletionItem { - completion_kind: Keyword, label: "loop", - kind: Some( - Keyword - ), - detail: None, - documentation: None, - lookup: None, - insert_text: Some( - "loop {$0}" - ), - insert_text_format: Snippet, source_range: [41; 41), - text_edit: None + kind: Keyword, + insert_text: "loop {$0}", + insert_text_format: Snippet }, CompletionItem { - completion_kind: Keyword, label: "match", - kind: Some( - Keyword - ), - detail: None, - documentation: None, - lookup: None, - insert_text: Some( - "match $0 {}" - ), - insert_text_format: Snippet, source_range: [41; 41), - text_edit: None + kind: Keyword, + insert_text: "match $0 {}", + insert_text_format: Snippet }, CompletionItem { - completion_kind: Keyword, label: "return", - kind: Some( - Keyword - ), - detail: None, - documentation: None, - lookup: None, - insert_text: Some( - "return;" - ), - insert_text_format: Snippet, source_range: [41; 41), - text_edit: None + kind: Keyword, + insert_text: "return;", + insert_text_format: Snippet }, CompletionItem { - completion_kind: Keyword, label: "while", - kind: Some( - Keyword - ), - detail: None, - documentation: None, - lookup: None, - insert_text: Some( - "while $0 {}" - ), - insert_text_format: Snippet, source_range: [41; 41), - text_edit: None + kind: Keyword, + insert_text: "while $0 {}", + insert_text_format: Snippet } ] 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 0eec578be..fd63c1678 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,120 +1,57 @@ --- -created: "2019-01-27T19:56:59.914744437+00:00" -creator: insta@0.5.2 -expression: kind_completions +created: "2019-02-18T07:29:59.630760038Z" +creator: insta@0.6.2 source: crates/ra_ide_api/src/completion/completion_item.rs +expression: kind_completions --- [ CompletionItem { - completion_kind: Keyword, label: "else", - kind: Some( - Keyword - ), - detail: None, - documentation: None, - lookup: None, - insert_text: Some( - "else {$0}" - ), - insert_text_format: Snippet, source_range: [92; 92), - text_edit: None + kind: Keyword, + insert_text: "else {$0}", + insert_text_format: Snippet }, CompletionItem { - completion_kind: Keyword, label: "else if", - kind: Some( - Keyword - ), - detail: None, - documentation: None, - lookup: None, - insert_text: Some( - "else if $0 {}" - ), - insert_text_format: Snippet, source_range: [92; 92), - text_edit: None + kind: Keyword, + insert_text: "else if $0 {}", + insert_text_format: Snippet }, CompletionItem { - completion_kind: Keyword, label: "if", - kind: Some( - Keyword - ), - detail: None, - documentation: None, - lookup: None, - insert_text: Some( - "if $0 {}" - ), - insert_text_format: Snippet, source_range: [92; 92), - text_edit: None + kind: Keyword, + insert_text: "if $0 {}", + insert_text_format: Snippet }, CompletionItem { - completion_kind: Keyword, label: "loop", - kind: Some( - Keyword - ), - detail: None, - documentation: None, - lookup: None, - insert_text: Some( - "loop {$0}" - ), - insert_text_format: Snippet, source_range: [92; 92), - text_edit: None + kind: Keyword, + insert_text: "loop {$0}", + insert_text_format: Snippet }, CompletionItem { - completion_kind: Keyword, label: "match", - kind: Some( - Keyword - ), - detail: None, - documentation: None, - lookup: None, - insert_text: Some( - "match $0 {}" - ), - insert_text_format: Snippet, source_range: [92; 92), - text_edit: None + kind: Keyword, + insert_text: "match $0 {}", + insert_text_format: Snippet }, CompletionItem { - completion_kind: Keyword, label: "return", - kind: Some( - Keyword - ), - detail: None, - documentation: None, - lookup: None, - insert_text: Some( - "return;" - ), - insert_text_format: Snippet, source_range: [92; 92), - text_edit: None + kind: Keyword, + insert_text: "return;", + insert_text_format: Snippet }, CompletionItem { - completion_kind: Keyword, label: "while", - kind: Some( - Keyword - ), - detail: None, - documentation: None, - lookup: None, - insert_text: Some( - "while $0 {}" - ), - insert_text_format: Snippet, source_range: [92; 92), - text_edit: None + kind: Keyword, + insert_text: "while $0 {}", + insert_text_format: Snippet } ] 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 4b99f15e1..90f769078 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,88 +1,43 @@ --- -created: "2019-01-27T19:56:59.927994050+00:00" -creator: insta@0.5.2 -expression: kind_completions +created: "2019-02-18T07:29:59.659527166Z" +creator: insta@0.6.2 source: crates/ra_ide_api/src/completion/completion_item.rs +expression: kind_completions --- [ CompletionItem { - completion_kind: Keyword, label: "if", - kind: Some( - Keyword - ), - detail: None, - documentation: None, - lookup: None, - insert_text: Some( - "if $0 {}" - ), - insert_text_format: Snippet, source_range: [48; 48), - text_edit: None + kind: Keyword, + insert_text: "if $0 {}", + insert_text_format: Snippet }, CompletionItem { - completion_kind: Keyword, label: "loop", - kind: Some( - Keyword - ), - detail: None, - documentation: None, - lookup: None, - insert_text: Some( - "loop {$0}" - ), - insert_text_format: Snippet, source_range: [48; 48), - text_edit: None + kind: Keyword, + insert_text: "loop {$0}", + insert_text_format: Snippet }, CompletionItem { - completion_kind: Keyword, label: "match", - kind: Some( - Keyword - ), - detail: None, - documentation: None, - lookup: None, - insert_text: Some( - "match $0 {}" - ), - insert_text_format: Snippet, source_range: [48; 48), - text_edit: None + kind: Keyword, + insert_text: "match $0 {}", + insert_text_format: Snippet }, CompletionItem { - completion_kind: Keyword, label: "return", - kind: Some( - Keyword - ), - detail: None, - documentation: None, - lookup: None, - insert_text: Some( - "return $0;" - ), - insert_text_format: Snippet, source_range: [48; 48), - text_edit: None + kind: Keyword, + insert_text: "return $0;", + insert_text_format: Snippet }, CompletionItem { - completion_kind: Keyword, label: "while", - kind: Some( - Keyword - ), - detail: None, - documentation: None, - lookup: None, - insert_text: Some( - "while $0 {}" - ), - insert_text_format: Snippet, source_range: [48; 48), - text_edit: None + kind: Keyword, + insert_text: "while $0 {}", + insert_text_format: Snippet } ] 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 f8587f147..5e7ec108c 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,88 +1,43 @@ --- -created: "2019-01-27T20:00:15.604538211+00:00" -creator: insta@0.5.2 -expression: kind_completions +created: "2019-02-18T07:29:59.696757543Z" +creator: insta@0.6.2 source: crates/ra_ide_api/src/completion/completion_item.rs +expression: kind_completions --- [ CompletionItem { - completion_kind: Keyword, label: "if", - kind: Some( - Keyword - ), - detail: None, - documentation: None, - lookup: None, - insert_text: Some( - "if $0 {}" - ), - insert_text_format: Snippet, source_range: [41; 41), - text_edit: None + kind: Keyword, + insert_text: "if $0 {}", + insert_text_format: Snippet }, CompletionItem { - completion_kind: Keyword, label: "loop", - kind: Some( - Keyword - ), - detail: None, - documentation: None, - lookup: None, - insert_text: Some( - "loop {$0}" - ), - insert_text_format: Snippet, source_range: [41; 41), - text_edit: None + kind: Keyword, + insert_text: "loop {$0}", + insert_text_format: Snippet }, CompletionItem { - completion_kind: Keyword, label: "match", - kind: Some( - Keyword - ), - detail: None, - documentation: None, - lookup: None, - insert_text: Some( - "match $0 {}" - ), - insert_text_format: Snippet, source_range: [41; 41), - text_edit: None + kind: Keyword, + insert_text: "match $0 {}", + insert_text_format: Snippet }, CompletionItem { - completion_kind: Keyword, label: "return", - kind: Some( - Keyword - ), - detail: None, - documentation: None, - lookup: None, - insert_text: Some( - "return;" - ), - insert_text_format: Snippet, source_range: [41; 41), - text_edit: None + kind: Keyword, + insert_text: "return;", + insert_text_format: Snippet }, CompletionItem { - completion_kind: Keyword, label: "while", - kind: Some( - Keyword - ), - detail: None, - documentation: None, - lookup: None, - insert_text: Some( - "while $0 {}" - ), - insert_text_format: Snippet, source_range: [41; 41), - text_edit: None + kind: Keyword, + insert_text: "while $0 {}", + insert_text_format: Snippet } ] 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 9dd5b2254..f969a843b 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,54 +1,27 @@ --- -created: "2019-01-23T05:27:32.196887+00:00" -creator: insta@0.4.0 -expression: kind_completions +created: "2019-02-18T07:29:59.633925638Z" +creator: insta@0.6.2 source: crates/ra_ide_api/src/completion/completion_item.rs +expression: kind_completions --- [ CompletionItem { - completion_kind: Keyword, label: "crate", - kind: Some( - Keyword - ), - detail: None, - documentation: None, - lookup: None, - insert_text: Some( - "crate::" - ), - insert_text_format: PlainText, source_range: [17; 17), - text_edit: None + kind: Keyword, + insert_text: "crate::", + insert_text_format: PlainText }, CompletionItem { - completion_kind: Keyword, label: "self", - kind: Some( - Keyword - ), - detail: None, - documentation: None, - lookup: None, - insert_text: None, - insert_text_format: PlainText, source_range: [17; 17), - text_edit: None + kind: Keyword }, CompletionItem { - completion_kind: Keyword, label: "super", - kind: Some( - Keyword - ), - detail: None, - documentation: None, - lookup: None, - insert_text: Some( - "super::" - ), - insert_text_format: PlainText, source_range: [17; 17), - text_edit: None + kind: Keyword, + insert_text: "super::", + insert_text_format: PlainText } ] 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 92224becc..bbbdeae8f 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,38 +1,20 @@ --- -created: "2019-01-22T14:45:00.698966900+00:00" -creator: insta@0.4.0 +created: "2019-02-18T07:29:59.658885169Z" +creator: insta@0.6.2 +source: crates/ra_ide_api/src/completion/completion_item.rs expression: kind_completions -source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs" --- [ CompletionItem { - completion_kind: Keyword, label: "self", - kind: Some( - Keyword - ), - detail: None, - documentation: None, - lookup: None, - insert_text: None, - insert_text_format: PlainText, source_range: [20; 20), - text_edit: None + kind: Keyword }, CompletionItem { - completion_kind: Keyword, label: "super", - kind: Some( - Keyword - ), - detail: None, - documentation: None, - lookup: None, - insert_text: Some( - "super::" - ), - insert_text_format: PlainText, source_range: [20; 20), - text_edit: None + kind: Keyword, + insert_text: "super::", + insert_text_format: PlainText } ] 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 965a0fbed..84475e0d8 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,38 +1,20 @@ --- -created: "2019-01-23T05:27:32.303390+00:00" -creator: insta@0.4.0 -expression: kind_completions +created: "2019-02-18T07:29:59.688856977Z" +creator: insta@0.6.2 source: crates/ra_ide_api/src/completion/completion_item.rs +expression: kind_completions --- [ CompletionItem { - completion_kind: Keyword, label: "self", - kind: Some( - Keyword - ), - detail: None, - documentation: None, - lookup: None, - insert_text: None, - insert_text_format: PlainText, source_range: [24; 24), - text_edit: None + kind: Keyword }, CompletionItem { - completion_kind: Keyword, label: "super", - kind: Some( - Keyword - ), - detail: None, - documentation: None, - lookup: None, - insert_text: Some( - "super::" - ), - insert_text_format: PlainText, source_range: [24; 24), - text_edit: None + kind: Keyword, + insert_text: "super::", + insert_text_format: PlainText } ] 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 3c27e079f..5d12dd41b 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,88 +1,43 @@ --- -created: "2019-01-27T19:56:59.918882346+00:00" -creator: insta@0.5.2 -expression: kind_completions +created: "2019-02-18T07:29:59.638715790Z" +creator: insta@0.6.2 source: crates/ra_ide_api/src/completion/completion_item.rs +expression: kind_completions --- [ CompletionItem { - completion_kind: Keyword, label: "if", - kind: Some( - Keyword - ), - detail: None, - documentation: None, - lookup: None, - insert_text: Some( - "if $0 {}" - ), - insert_text_format: Snippet, source_range: [83; 83), - text_edit: None + kind: Keyword, + insert_text: "if $0 {}", + insert_text_format: Snippet }, CompletionItem { - completion_kind: Keyword, label: "loop", - kind: Some( - Keyword - ), - detail: None, - documentation: None, - lookup: None, - insert_text: Some( - "loop {$0}" - ), - insert_text_format: Snippet, source_range: [83; 83), - text_edit: None + kind: Keyword, + insert_text: "loop {$0}", + insert_text_format: Snippet }, CompletionItem { - completion_kind: Keyword, label: "match", - kind: Some( - Keyword - ), - detail: None, - documentation: None, - lookup: None, - insert_text: Some( - "match $0 {}" - ), - insert_text_format: Snippet, source_range: [83; 83), - text_edit: None + kind: Keyword, + insert_text: "match $0 {}", + insert_text_format: Snippet }, CompletionItem { - completion_kind: Keyword, label: "return", - kind: Some( - Keyword - ), - detail: None, - documentation: None, - lookup: None, - insert_text: Some( - "return $0;" - ), - insert_text_format: Snippet, source_range: [83; 83), - text_edit: None + kind: Keyword, + insert_text: "return $0;", + insert_text_format: Snippet }, CompletionItem { - completion_kind: Keyword, label: "while", - kind: Some( - Keyword - ), - detail: None, - documentation: None, - lookup: None, - insert_text: Some( - "while $0 {}" - ), - insert_text_format: Snippet, source_range: [83; 83), - text_edit: None + kind: Keyword, + insert_text: "while $0 {}", + insert_text_format: Snippet } ] 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 d1be8c6e7..5866369b6 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,88 +1,43 @@ --- -created: "2019-01-27T20:00:15.604282112+00:00" -creator: insta@0.5.2 -expression: kind_completions +created: "2019-02-18T07:29:59.661936290Z" +creator: insta@0.6.2 source: crates/ra_ide_api/src/completion/completion_item.rs +expression: kind_completions --- [ CompletionItem { - completion_kind: Keyword, label: "if", - kind: Some( - Keyword - ), - detail: None, - documentation: None, - lookup: None, - insert_text: Some( - "if $0 {}" - ), - insert_text_format: Snippet, source_range: [83; 83), - text_edit: None + kind: Keyword, + insert_text: "if $0 {}", + insert_text_format: Snippet }, CompletionItem { - completion_kind: Keyword, label: "loop", - kind: Some( - Keyword - ), - detail: None, - documentation: None, - lookup: None, - insert_text: Some( - "loop {$0}" - ), - insert_text_format: Snippet, source_range: [83; 83), - text_edit: None + kind: Keyword, + insert_text: "loop {$0}", + insert_text_format: Snippet }, CompletionItem { - completion_kind: Keyword, label: "match", - kind: Some( - Keyword - ), - detail: None, - documentation: None, - lookup: None, - insert_text: Some( - "match $0 {}" - ), - insert_text_format: Snippet, source_range: [83; 83), - text_edit: None + kind: Keyword, + insert_text: "match $0 {}", + insert_text_format: Snippet }, CompletionItem { - completion_kind: Keyword, label: "return", - kind: Some( - Keyword - ), - detail: None, - documentation: None, - lookup: None, - insert_text: Some( - "return $0;" - ), - insert_text_format: Snippet, source_range: [83; 83), - text_edit: None + kind: Keyword, + insert_text: "return $0;", + insert_text_format: Snippet }, CompletionItem { - completion_kind: Keyword, label: "while", - kind: Some( - Keyword - ), - detail: None, - documentation: None, - lookup: None, - insert_text: Some( - "while $0 {}" - ), - insert_text_format: Snippet, source_range: [83; 83), - text_edit: None + kind: Keyword, + insert_text: "while $0 {}", + insert_text_format: Snippet } ] 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 46f9fa971..4753eece7 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,26 +1,16 @@ --- -created: "2019-02-12T18:32:09.428929418Z" +created: "2019-02-18T07:29:59.598946710Z" creator: insta@0.6.2 source: crates/ra_ide_api/src/completion/completion_item.rs expression: kind_completions --- [ CompletionItem { - completion_kind: Reference, label: "the_method", - kind: Some( - Method - ), - detail: Some( - "fn the_method(&self)" - ), - documentation: None, - lookup: None, - insert_text: Some( - "the_method()$0" - ), - insert_text_format: Snippet, source_range: [249; 249), - text_edit: None + kind: Method, + detail: "fn the_method(&self)", + insert_text: "the_method()$0", + insert_text_format: Snippet } ] 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 10fe59248..6cc8ab26c 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,26 +1,16 @@ --- -created: "2019-01-23T13:19:23.501258181+00:00" -creator: insta@0.5.2 -expression: kind_completions +created: "2019-02-18T07:29:59.598948318Z" +creator: insta@0.6.2 source: crates/ra_ide_api/src/completion/completion_item.rs +expression: kind_completions --- [ CompletionItem { - completion_kind: Reference, label: "the_method", - kind: Some( - Method - ), - detail: Some( - "fn the_method(&self)" - ), - documentation: None, - lookup: None, - insert_text: Some( - "the_method()$0" - ), - insert_text_format: Snippet, source_range: [144; 144), - text_edit: None + kind: Method, + detail: "fn the_method(&self)", + insert_text: "the_method()$0", + insert_text_format: Snippet } ] 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 3db7119a7..47579bde1 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,26 +1,16 @@ --- -created: "2019-01-25T17:49:28.949186500+00:00" -creator: insta@0.5.2 -expression: kind_completions +created: "2019-02-18T07:29:59.682030298Z" +creator: insta@0.6.2 source: crates/ra_ide_api/src/completion/completion_item.rs +expression: kind_completions --- [ CompletionItem { - completion_kind: Reference, label: "my", - kind: Some( - Module - ), - detail: None, - documentation: Some( - Documentation( - "Some simple\ndocs describing `mod my`." - ) - ), - lookup: None, - insert_text: None, - insert_text_format: PlainText, source_range: [23; 25), - text_edit: None + 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 f6bba49ae..28efac43f 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,54 +1,26 @@ --- -created: "2019-01-27T19:56:59.953151082+00:00" -creator: insta@0.5.2 -expression: kind_completions +created: "2019-02-18T07:29:59.770568686Z" +creator: insta@0.6.2 source: crates/ra_ide_api/src/completion/completion_item.rs +expression: kind_completions --- [ CompletionItem { - completion_kind: Reference, label: "Baz", - kind: Some( - Enum - ), - detail: None, - documentation: None, - lookup: None, - insert_text: None, - insert_text_format: PlainText, source_range: [89; 89), - text_edit: None + kind: Enum }, CompletionItem { - completion_kind: Reference, label: "Foo", - kind: Some( - Struct - ), - detail: None, - documentation: None, - lookup: None, - insert_text: None, - insert_text_format: PlainText, source_range: [89; 89), - text_edit: None + kind: Struct }, CompletionItem { - completion_kind: Reference, label: "quux", - kind: Some( - Function - ), - detail: Some( - "fn quux()" - ), - documentation: None, - lookup: None, - insert_text: Some( - "quux()$0" - ), - insert_text_format: Snippet, source_range: [89; 89), - text_edit: None + kind: Function, + detail: "fn quux()", + insert_text: "quux()$0", + insert_text_format: Snippet } ] 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 7c458664e..01b6b968c 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,40 +1,21 @@ --- -created: "2019-01-27T19:56:59.959185284+00:00" -creator: insta@0.5.2 -expression: kind_completions +created: "2019-02-18T07:29:59.770992040Z" +creator: insta@0.6.2 source: crates/ra_ide_api/src/completion/completion_item.rs +expression: kind_completions --- [ CompletionItem { - completion_kind: Reference, label: "Bar", - kind: Some( - Struct - ), - detail: None, - documentation: None, - lookup: None, - insert_text: None, - insert_text_format: PlainText, source_range: [101; 101), - text_edit: None + kind: Struct }, CompletionItem { - completion_kind: Reference, label: "quux", - kind: Some( - Function - ), - detail: Some( - "fn quux()" - ), - documentation: None, - lookup: None, - insert_text: Some( - "quux()$0" - ), - insert_text_format: Snippet, source_range: [101; 101), - text_edit: None + kind: Function, + detail: "fn quux()", + insert_text: "quux()$0", + insert_text_format: Snippet } ] 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 62fb0a966..e95763580 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,36 +1,18 @@ --- -created: "2019-01-22T14:45:00.723900500+00:00" -creator: insta@0.4.0 +created: "2019-02-18T07:29:59.689653720Z" +creator: insta@0.6.2 +source: crates/ra_ide_api/src/completion/completion_item.rs expression: kind_completions -source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs" --- [ CompletionItem { - completion_kind: Reference, label: "Spam", - kind: Some( - Struct - ), - detail: None, - documentation: None, - lookup: None, - insert_text: None, - insert_text_format: PlainText, source_range: [12; 14), - text_edit: None + kind: Struct }, CompletionItem { - completion_kind: Reference, label: "foo", - kind: Some( - Module - ), - detail: None, - documentation: None, - lookup: None, - insert_text: None, - insert_text_format: PlainText, source_range: [12; 14), - text_edit: None + 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 5a35d9ca9..1295355a2 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,120 +1,51 @@ --- -created: "2019-01-27T19:56:59.922933445+00:00" -creator: insta@0.5.2 -expression: kind_completions +created: "2019-02-18T07:29:59.641375216Z" +creator: insta@0.6.2 source: crates/ra_ide_api/src/completion/completion_item.rs +expression: kind_completions --- [ CompletionItem { - completion_kind: Keyword, label: "break", - kind: Some( - Keyword - ), - detail: None, - documentation: None, - lookup: None, - insert_text: Some( - "break" - ), - insert_text_format: Snippet, source_range: [106; 108), - text_edit: None + kind: Keyword }, CompletionItem { - completion_kind: Keyword, label: "continue", - kind: Some( - Keyword - ), - detail: None, - documentation: None, - lookup: None, - insert_text: Some( - "continue" - ), - insert_text_format: Snippet, source_range: [106; 108), - text_edit: None + kind: Keyword }, CompletionItem { - completion_kind: Keyword, label: "if", - kind: Some( - Keyword - ), - detail: None, - documentation: None, - lookup: None, - insert_text: Some( - "if $0 {}" - ), - insert_text_format: Snippet, source_range: [106; 108), - text_edit: None + kind: Keyword, + insert_text: "if $0 {}", + insert_text_format: Snippet }, CompletionItem { - completion_kind: Keyword, label: "loop", - kind: Some( - Keyword - ), - detail: None, - documentation: None, - lookup: None, - insert_text: Some( - "loop {$0}" - ), - insert_text_format: Snippet, source_range: [106; 108), - text_edit: None + kind: Keyword, + insert_text: "loop {$0}", + insert_text_format: Snippet }, CompletionItem { - completion_kind: Keyword, label: "match", - kind: Some( - Keyword - ), - detail: None, - documentation: None, - lookup: None, - insert_text: Some( - "match $0 {}" - ), - insert_text_format: Snippet, source_range: [106; 108), - text_edit: None + kind: Keyword, + insert_text: "match $0 {}", + insert_text_format: Snippet }, CompletionItem { - completion_kind: Keyword, label: "return", - kind: Some( - Keyword - ), - detail: None, - documentation: None, - lookup: None, - insert_text: Some( - "return" - ), - insert_text_format: Snippet, source_range: [106; 108), - text_edit: None + kind: Keyword }, CompletionItem { - completion_kind: Keyword, label: "while", - kind: Some( - Keyword - ), - detail: None, - documentation: None, - lookup: None, - insert_text: Some( - "while $0 {}" - ), - insert_text_format: Snippet, source_range: [106; 108), - text_edit: None + kind: Keyword, + insert_text: "while $0 {}", + insert_text_format: Snippet } ] 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 a5a7713ef..dba925f7c 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,22 +1,13 @@ --- -created: "2019-01-22T14:45:00.545423800+00:00" -creator: insta@0.4.0 +created: "2019-02-18T07:29:59.606265507Z" +creator: insta@0.6.2 +source: crates/ra_ide_api/src/completion/completion_item.rs expression: kind_completions -source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs" --- [ CompletionItem { - completion_kind: Magic, label: "file_id: FileId", - kind: None, - detail: None, - documentation: None, - lookup: Some( - "file_id" - ), - insert_text: None, - insert_text_format: PlainText, source_range: [98; 102), - text_edit: None + 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 0df4fcf57..c5873becb 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,22 +1,13 @@ --- -created: "2019-01-22T14:45:00.552379600+00:00" -creator: insta@0.4.0 +created: "2019-02-18T07:29:59.606265538Z" +creator: insta@0.6.2 +source: crates/ra_ide_api/src/completion/completion_item.rs expression: kind_completions -source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs" --- [ CompletionItem { - completion_kind: Magic, label: "file_id: FileId", - kind: None, - detail: None, - documentation: None, - lookup: Some( - "file_id" - ), - insert_text: None, - insert_text_format: PlainText, source_range: [98; 102), - text_edit: None + 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 905ece338..5231db54c 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,22 +1,13 @@ --- -created: "2019-01-22T14:45:00.619180200+00:00" -creator: insta@0.4.0 +created: "2019-02-18T07:29:59.628419014Z" +creator: insta@0.6.2 +source: crates/ra_ide_api/src/completion/completion_item.rs expression: kind_completions -source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs" --- [ CompletionItem { - completion_kind: Magic, label: "file_id: FileId", - kind: None, - detail: None, - documentation: None, - lookup: Some( - "file_id" - ), - insert_text: None, - insert_text_format: PlainText, source_range: [269; 273), - text_edit: None + 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 d3e53e4e8..bd22d546a 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,183 +1,113 @@ --- -created: "2019-02-14T18:33:26.102469493Z" +created: "2019-02-18T07:29:59.734401559Z" creator: insta@0.6.2 source: crates/ra_ide_api/src/completion/completion_item.rs expression: kind_completions --- [ CompletionItem { - completion_kind: Postfix, label: "dbg", - kind: None, - detail: Some( - "dbg!(expr)" - ), - documentation: None, - lookup: None, - insert_text: Some( - "dbg!(bar)" - ), - insert_text_format: Snippet, source_range: [76; 76), - text_edit: Some( - TextEdit { - atoms: [ - AtomTextEdit { - delete: [72; 76), - insert: "" - } - ] - } - ) + detail: "dbg!(expr)", + insert_text: "dbg!(bar)", + insert_text_format: Snippet, + text_edit: TextEdit { + atoms: [ + AtomTextEdit { + delete: [72; 76), + insert: "" + } + ] + } }, CompletionItem { - completion_kind: Postfix, label: "if", - kind: None, - detail: Some( - "if expr {}" - ), - documentation: None, - lookup: None, - insert_text: Some( - "if bar {$0}" - ), - insert_text_format: Snippet, source_range: [76; 76), - text_edit: Some( - TextEdit { - atoms: [ - AtomTextEdit { - delete: [72; 76), - insert: "" - } - ] - } - ) + detail: "if expr {}", + insert_text: "if bar {$0}", + insert_text_format: Snippet, + text_edit: TextEdit { + atoms: [ + AtomTextEdit { + delete: [72; 76), + insert: "" + } + ] + } }, CompletionItem { - completion_kind: Postfix, label: "match", - kind: None, - detail: Some( - "match expr {}" - ), - documentation: None, - lookup: None, - insert_text: Some( - "match bar {\n${1:_} => {$0\\},\n}" - ), - insert_text_format: Snippet, source_range: [76; 76), - text_edit: Some( - TextEdit { - atoms: [ - AtomTextEdit { - delete: [72; 76), - insert: "" - } - ] - } - ) + detail: "match expr {}", + insert_text: "match bar {\n${1:_} => {$0\\},\n}", + insert_text_format: Snippet, + text_edit: TextEdit { + atoms: [ + AtomTextEdit { + delete: [72; 76), + insert: "" + } + ] + } }, CompletionItem { - completion_kind: Postfix, label: "not", - kind: None, - detail: Some( - "!expr" - ), - documentation: None, - lookup: None, - insert_text: Some( - "!bar" - ), - insert_text_format: Snippet, source_range: [76; 76), - text_edit: Some( - TextEdit { - atoms: [ - AtomTextEdit { - delete: [72; 76), - insert: "" - } - ] - } - ) + detail: "!expr", + insert_text: "!bar", + insert_text_format: Snippet, + text_edit: TextEdit { + atoms: [ + AtomTextEdit { + delete: [72; 76), + insert: "" + } + ] + } }, CompletionItem { - completion_kind: Postfix, label: "ref", - kind: None, - detail: Some( - "&expr" - ), - documentation: None, - lookup: None, - insert_text: Some( - "&bar" - ), - insert_text_format: Snippet, source_range: [76; 76), - text_edit: Some( - TextEdit { - atoms: [ - AtomTextEdit { - delete: [72; 76), - insert: "" - } - ] - } - ) + detail: "&expr", + insert_text: "&bar", + insert_text_format: Snippet, + text_edit: TextEdit { + atoms: [ + AtomTextEdit { + delete: [72; 76), + insert: "" + } + ] + } }, CompletionItem { - completion_kind: Postfix, label: "refm", - kind: None, - detail: Some( - "&mut expr" - ), - documentation: None, - lookup: None, - insert_text: Some( - "&mut bar" - ), - insert_text_format: Snippet, source_range: [76; 76), - text_edit: Some( - TextEdit { - atoms: [ - AtomTextEdit { - delete: [72; 76), - insert: "" - } - ] - } - ) + detail: "&mut expr", + insert_text: "&mut bar", + insert_text_format: Snippet, + text_edit: TextEdit { + atoms: [ + AtomTextEdit { + delete: [72; 76), + insert: "" + } + ] + } }, CompletionItem { - completion_kind: Postfix, label: "while", - kind: None, - detail: Some( - "while expr {}" - ), - documentation: None, - lookup: None, - insert_text: Some( - "while bar {\n$0\n}" - ), - insert_text_format: Snippet, source_range: [76; 76), - text_edit: Some( - TextEdit { - atoms: [ - AtomTextEdit { - delete: [72; 76), - insert: "" - } - ] - } - ) + detail: "while expr {}", + insert_text: "while bar {\n$0\n}", + insert_text_format: Snippet, + text_edit: TextEdit { + atoms: [ + AtomTextEdit { + delete: [72; 76), + insert: "" + } + ] + } } ] 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 adc057d80..25c5007e4 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,40 +1,21 @@ --- -created: "2019-01-23T05:27:32.421411+00:00" -creator: insta@0.4.0 -expression: kind_completions +created: "2019-02-18T07:29:59.780512486Z" +creator: insta@0.6.2 source: crates/ra_ide_api/src/completion/completion_item.rs +expression: kind_completions --- [ CompletionItem { - completion_kind: Reference, label: "Foo", - kind: Some( - Struct - ), - detail: None, - documentation: None, - lookup: None, - insert_text: None, - insert_text_format: PlainText, source_range: [47; 47), - text_edit: None + kind: Struct }, CompletionItem { - completion_kind: Reference, label: "x", - kind: Some( - Function - ), - detail: Some( - "fn x() ->" - ), - documentation: None, - lookup: None, - insert_text: Some( - "x()$0" - ), - insert_text_format: Snippet, source_range: [47; 47), - text_edit: None + kind: Function, + detail: "fn x() ->", + insert_text: "x()$0", + insert_text_format: Snippet } ] 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 ba1d4abbd..d390be2dc 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,36 +1,18 @@ --- -created: "2019-01-27T20:17:10.051725945+00:00" -creator: insta@0.5.2 -expression: kind_completions +created: "2019-02-18T07:29:59.774705610Z" +creator: insta@0.6.2 source: crates/ra_ide_api/src/completion/completion_item.rs +expression: kind_completions --- [ CompletionItem { - completion_kind: Reference, label: "Self", - kind: Some( - TypeParam - ), - detail: None, - documentation: None, - lookup: None, - insert_text: None, - insert_text_format: PlainText, source_range: [25; 25), - text_edit: None + kind: TypeParam }, CompletionItem { - completion_kind: Reference, label: "self", - kind: Some( - Binding - ), - detail: None, - documentation: None, - lookup: None, - insert_text: None, - insert_text_format: PlainText, source_range: [25; 25), - text_edit: None + 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 580c90bdd..6ad919849 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,40 +1,22 @@ --- -created: "2019-01-23T05:27:32.430450+00:00" -creator: insta@0.4.0 -expression: kind_completions +created: "2019-02-18T07:29:59.799497268Z" +creator: insta@0.6.2 source: crates/ra_ide_api/src/completion/completion_item.rs +expression: kind_completions --- [ CompletionItem { - completion_kind: Snippet, label: "pd", - kind: Some( - Snippet - ), - detail: None, - documentation: None, - lookup: None, - insert_text: Some( - "eprintln!(\"$0 = {:?}\", $0);" - ), - insert_text_format: Snippet, source_range: [17; 17), - text_edit: None + kind: Snippet, + insert_text: "eprintln!(\"$0 = {:?}\", $0);", + insert_text_format: Snippet }, CompletionItem { - completion_kind: Snippet, label: "ppd", - kind: Some( - Snippet - ), - detail: None, - documentation: None, - lookup: None, - insert_text: Some( - "eprintln!(\"$0 = {:#?}\", $0);" - ), - insert_text_format: Snippet, source_range: [17; 17), - text_edit: None + kind: Snippet, + insert_text: "eprintln!(\"$0 = {:#?}\", $0);", + insert_text_format: 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 ec95e454c..43367010b 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,42 +1,23 @@ --- -created: "2019-01-23T05:27:32.435110+00:00" -creator: insta@0.4.0 -expression: kind_completions +created: "2019-02-18T07:29:59.800831987Z" +creator: insta@0.6.2 source: crates/ra_ide_api/src/completion/completion_item.rs +expression: kind_completions --- [ CompletionItem { - completion_kind: Snippet, label: "Test function", - kind: Some( - Snippet - ), - detail: None, - documentation: None, - lookup: Some( - "tfn" - ), - insert_text: Some( - "#[test]\nfn ${1:feature}() {\n $0\n}" - ), - insert_text_format: Snippet, source_range: [66; 66), - text_edit: None + kind: Snippet, + lookup: "tfn", + insert_text: "#[test]\nfn ${1:feature}() {\n $0\n}", + insert_text_format: Snippet }, CompletionItem { - completion_kind: Snippet, label: "pub(crate)", - kind: Some( - Snippet - ), - detail: None, - documentation: None, - lookup: None, - insert_text: Some( - "pub(crate) $0" - ), - insert_text_format: Snippet, source_range: [66; 66), - text_edit: None + kind: Snippet, + insert_text: "pub(crate) $0", + insert_text_format: 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 ff1eef5f5..c78b06d3c 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,28 +1,17 @@ --- -created: "2019-02-12T09:57:51.107816726Z" +created: "2019-02-18T07:29:59.704544613Z" creator: insta@0.6.2 source: crates/ra_ide_api/src/completion/completion_item.rs expression: kind_completions --- [ CompletionItem { - completion_kind: Reference, label: "C", - kind: Some( - Const - ), - detail: Some( - "const C: i32 = 42;" - ), - documentation: Some( - Documentation( - "An associated const" - ) - ), - lookup: None, - insert_text: None, - insert_text_format: PlainText, source_range: [107; 107), - text_edit: None + kind: Const, + detail: "const C: i32 = 42;", + documentation: Documentation( + "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 c53c61d0e..67638b4d1 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,30 +1,19 @@ --- -created: "2019-02-12T09:57:51.106389138Z" +created: "2019-02-18T07:29:59.704544615Z" creator: insta@0.6.2 source: crates/ra_ide_api/src/completion/completion_item.rs expression: kind_completions --- [ CompletionItem { - completion_kind: Reference, label: "m", - kind: Some( - Method - ), - detail: Some( - "fn m()" - ), - documentation: Some( - Documentation( - "An associated method" - ) - ), - lookup: None, - insert_text: Some( - "m()$0" - ), - insert_text_format: Snippet, source_range: [100; 100), - text_edit: None + kind: Method, + detail: "fn m()", + documentation: Documentation( + "An associated method" + ), + insert_text: "m()$0", + insert_text_format: Snippet } ] 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 e993fb1b0..c5f5b9f10 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,28 +1,17 @@ --- -created: "2019-02-12T09:33:54.719956203Z" +created: "2019-02-18T07:29:59.725668999Z" creator: insta@0.6.2 source: crates/ra_ide_api/src/completion/completion_item.rs expression: kind_completions --- [ CompletionItem { - completion_kind: Reference, label: "T", - kind: Some( - TypeAlias - ), - detail: Some( - "type T = i32;" - ), - documentation: Some( - Documentation( - "An associated type" - ) - ), - lookup: None, - insert_text: None, - insert_text_format: PlainText, source_range: [101; 101), - text_edit: None + kind: TypeAlias, + detail: "type T = i32;", + documentation: Documentation( + "An associated type" + ) } ] 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 e8dc12dfd..ffad98f7d 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,24 +1,14 @@ --- -created: "2019-01-22T14:45:00.545423800+00:00" -creator: insta@0.4.0 +created: "2019-02-18T07:29:59.599230647Z" +creator: insta@0.6.2 +source: crates/ra_ide_api/src/completion/completion_item.rs expression: kind_completions -source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs" --- [ CompletionItem { - completion_kind: Reference, label: "the_field", - kind: Some( - Field - ), - detail: Some( - "u32" - ), - documentation: None, - lookup: None, - insert_text: None, - insert_text_format: PlainText, source_range: [85; 85), - text_edit: None + 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 4d5c7a869..99aef933a 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,42 +1,22 @@ --- -created: "2019-01-27T19:56:59.910113268+00:00" -creator: insta@0.5.2 -expression: kind_completions +created: "2019-02-18T07:29:59.598966298Z" +creator: insta@0.6.2 source: crates/ra_ide_api/src/completion/completion_item.rs +expression: kind_completions --- [ CompletionItem { - completion_kind: Reference, label: "foo", - kind: Some( - Method - ), - detail: Some( - "fn foo(&self)" - ), - documentation: None, - lookup: None, - insert_text: Some( - "foo()$0" - ), - insert_text_format: Snippet, source_range: [126; 126), - text_edit: None + kind: Method, + detail: "fn foo(&self)", + insert_text: "foo()$0", + insert_text_format: Snippet }, CompletionItem { - completion_kind: Reference, label: "the_field", - kind: Some( - Field - ), - detail: Some( - "(u32, i32)" - ), - documentation: None, - lookup: None, - insert_text: None, - insert_text_format: PlainText, source_range: [126; 126), - text_edit: None + 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 1073d90fd..52991b9fb 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,46 +1,25 @@ --- -created: "2019-01-27T19:56:59.909689544+00:00" -creator: insta@0.5.2 -expression: kind_completions +created: "2019-02-18T07:29:59.598965593Z" +creator: insta@0.6.2 source: crates/ra_ide_api/src/completion/completion_item.rs +expression: kind_completions --- [ CompletionItem { - completion_kind: Reference, label: "foo", - kind: Some( - Method - ), - detail: Some( - "fn foo(self)" - ), - documentation: None, - lookup: None, - insert_text: Some( - "foo()$0" - ), - insert_text_format: Snippet, source_range: [187; 187), - text_edit: None + kind: Method, + detail: "fn foo(self)", + insert_text: "foo()$0", + insert_text_format: Snippet }, CompletionItem { - completion_kind: Reference, label: "the_field", - kind: Some( - Field - ), - detail: Some( - "(u32,)" - ), - documentation: Some( - Documentation( - "This is the_field" - ) - ), - lookup: None, - insert_text: None, - insert_text_format: PlainText, source_range: [187; 187), - text_edit: None + kind: Field, + detail: "(u32,)", + documentation: Documentation( + "This is the_field" + ) } ] 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 c9764eab3..5b6ed9d77 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,40 +1,20 @@ --- -created: "2019-01-24T13:22:02.107228200+00:00" -creator: insta@0.5.2 -expression: kind_completions +created: "2019-02-18T07:29:59.598973382Z" +creator: insta@0.6.2 source: crates/ra_ide_api/src/completion/completion_item.rs +expression: kind_completions --- [ CompletionItem { - completion_kind: Reference, label: "0", - kind: Some( - Field - ), - detail: Some( - "i32" - ), - documentation: None, - lookup: None, - insert_text: None, - insert_text_format: PlainText, source_range: [75; 75), - text_edit: None + kind: Field, + detail: "i32" }, CompletionItem { - completion_kind: Reference, label: "1", - kind: Some( - Field - ), - detail: Some( - "f64" - ), - documentation: None, - lookup: None, - insert_text: None, - insert_text_format: PlainText, source_range: [75; 75), - text_edit: None + 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 01294ca40..3c670ad5b 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,36 +1,18 @@ --- -created: "2019-01-22T14:45:00.761799100+00:00" -creator: insta@0.4.0 +created: "2019-02-18T07:29:59.726365989Z" +creator: insta@0.6.2 +source: crates/ra_ide_api/src/completion/completion_item.rs expression: kind_completions -source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs" --- [ CompletionItem { - completion_kind: Reference, label: "Spam", - kind: Some( - Struct - ), - detail: None, - documentation: None, - lookup: None, - insert_text: None, - insert_text_format: PlainText, source_range: [11; 13), - text_edit: None + kind: Struct }, CompletionItem { - completion_kind: Reference, label: "foo", - kind: Some( - Module - ), - detail: None, - documentation: None, - lookup: None, - insert_text: None, - insert_text_format: PlainText, source_range: [11; 13), - text_edit: None + 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 33dd2b904..bf314de84 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,22 +1,13 @@ --- -created: "2019-01-22T14:45:00.780748400+00:00" -creator: insta@0.4.0 +created: "2019-02-18T07:29:59.731789946Z" +creator: insta@0.6.2 +source: crates/ra_ide_api/src/completion/completion_item.rs expression: kind_completions -source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs" --- [ CompletionItem { - completion_kind: Reference, label: "Bar", - kind: Some( - Struct - ), - detail: None, - documentation: None, - lookup: None, - insert_text: None, - insert_text_format: PlainText, source_range: [26; 26), - text_edit: None + kind: Struct } ] -- cgit v1.2.3