diff options
Diffstat (limited to 'crates')
-rw-r--r-- | crates/ra_ide_api/src/completion/complete_postfix.rs | 2 | ||||
-rw-r--r-- | crates/ra_ide_api/src/completion/snapshots/completion_item__postfix_completion_works_for_trivial_path_expression.snap | 20 |
2 files changed, 11 insertions, 11 deletions
diff --git a/crates/ra_ide_api/src/completion/complete_postfix.rs b/crates/ra_ide_api/src/completion/complete_postfix.rs index d1f6b9433..cf8c63269 100644 --- a/crates/ra_ide_api/src/completion/complete_postfix.rs +++ b/crates/ra_ide_api/src/completion/complete_postfix.rs | |||
@@ -32,7 +32,7 @@ pub(super) fn complete_postfix(acc: &mut Completions, ctx: &CompletionContext) { | |||
32 | let receiver_text = dot_receiver.syntax().text().to_string(); | 32 | let receiver_text = dot_receiver.syntax().text().to_string(); |
33 | postfix_snippet(ctx, "not", "!expr", &format!("!{}", receiver_text)).add_to(acc); | 33 | postfix_snippet(ctx, "not", "!expr", &format!("!{}", receiver_text)).add_to(acc); |
34 | postfix_snippet(ctx, "ref", "&expr", &format!("&{}", receiver_text)).add_to(acc); | 34 | postfix_snippet(ctx, "ref", "&expr", &format!("&{}", receiver_text)).add_to(acc); |
35 | postfix_snippet(ctx, "mref", "&mut expr", &format!("&mut {}", receiver_text)).add_to(acc); | 35 | postfix_snippet(ctx, "refm", "&mut expr", &format!("&mut {}", receiver_text)).add_to(acc); |
36 | postfix_snippet(ctx, "if", "if expr {}", &format!("if {} {{$0}}", receiver_text)) | 36 | postfix_snippet(ctx, "if", "if expr {}", &format!("if {} {{$0}}", receiver_text)) |
37 | .add_to(acc); | 37 | .add_to(acc); |
38 | postfix_snippet( | 38 | postfix_snippet( |
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 6f4351445..d3e53e4e8 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 @@ | |||
1 | --- | 1 | --- |
2 | created: "2019-02-14T17:38:20.322102467Z" | 2 | created: "2019-02-14T18:33:26.102469493Z" |
3 | creator: [email protected] | 3 | creator: [email protected] |
4 | source: crates/ra_ide_api/src/completion/completion_item.rs | 4 | source: crates/ra_ide_api/src/completion/completion_item.rs |
5 | expression: kind_completions | 5 | expression: kind_completions |
@@ -82,15 +82,15 @@ expression: kind_completions | |||
82 | }, | 82 | }, |
83 | CompletionItem { | 83 | CompletionItem { |
84 | completion_kind: Postfix, | 84 | completion_kind: Postfix, |
85 | label: "mref", | 85 | label: "not", |
86 | kind: None, | 86 | kind: None, |
87 | detail: Some( | 87 | detail: Some( |
88 | "&mut expr" | 88 | "!expr" |
89 | ), | 89 | ), |
90 | documentation: None, | 90 | documentation: None, |
91 | lookup: None, | 91 | lookup: None, |
92 | insert_text: Some( | 92 | insert_text: Some( |
93 | "&mut bar" | 93 | "!bar" |
94 | ), | 94 | ), |
95 | insert_text_format: Snippet, | 95 | insert_text_format: Snippet, |
96 | source_range: [76; 76), | 96 | source_range: [76; 76), |
@@ -107,15 +107,15 @@ expression: kind_completions | |||
107 | }, | 107 | }, |
108 | CompletionItem { | 108 | CompletionItem { |
109 | completion_kind: Postfix, | 109 | completion_kind: Postfix, |
110 | label: "not", | 110 | label: "ref", |
111 | kind: None, | 111 | kind: None, |
112 | detail: Some( | 112 | detail: Some( |
113 | "!expr" | 113 | "&expr" |
114 | ), | 114 | ), |
115 | documentation: None, | 115 | documentation: None, |
116 | lookup: None, | 116 | lookup: None, |
117 | insert_text: Some( | 117 | insert_text: Some( |
118 | "!bar" | 118 | "&bar" |
119 | ), | 119 | ), |
120 | insert_text_format: Snippet, | 120 | insert_text_format: Snippet, |
121 | source_range: [76; 76), | 121 | source_range: [76; 76), |
@@ -132,15 +132,15 @@ expression: kind_completions | |||
132 | }, | 132 | }, |
133 | CompletionItem { | 133 | CompletionItem { |
134 | completion_kind: Postfix, | 134 | completion_kind: Postfix, |
135 | label: "ref", | 135 | label: "refm", |
136 | kind: None, | 136 | kind: None, |
137 | detail: Some( | 137 | detail: Some( |
138 | "&expr" | 138 | "&mut expr" |
139 | ), | 139 | ), |
140 | documentation: None, | 140 | documentation: None, |
141 | lookup: None, | 141 | lookup: None, |
142 | insert_text: Some( | 142 | insert_text: Some( |
143 | "&bar" | 143 | "&mut bar" |
144 | ), | 144 | ), |
145 | insert_text_format: Snippet, | 145 | insert_text_format: Snippet, |
146 | source_range: [76; 76), | 146 | source_range: [76; 76), |