diff options
author | Aleksey Kladov <[email protected]> | 2019-11-15 09:56:24 +0000 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2019-11-15 09:56:24 +0000 |
commit | 3564fbb7f5fc7fc91530c441a6dacce88762fcc9 (patch) | |
tree | 5674794ed5d5eb7be2026d6cf2105602fa87d882 /crates/ra_ide_api/src/completion/complete_postfix.rs | |
parent | e05fc9455dd64c240ddc5896f739ea3842838210 (diff) |
Auto-upgrade some insta snapshots
Diffstat (limited to 'crates/ra_ide_api/src/completion/complete_postfix.rs')
-rw-r--r-- | crates/ra_ide_api/src/completion/complete_postfix.rs | 298 |
1 files changed, 152 insertions, 146 deletions
diff --git a/crates/ra_ide_api/src/completion/complete_postfix.rs b/crates/ra_ide_api/src/completion/complete_postfix.rs index 99fed8689..17b75cf7e 100644 --- a/crates/ra_ide_api/src/completion/complete_postfix.rs +++ b/crates/ra_ide_api/src/completion/complete_postfix.rs | |||
@@ -104,64 +104,66 @@ mod tests { | |||
104 | } | 104 | } |
105 | "#, | 105 | "#, |
106 | ), | 106 | ), |
107 | @r###"[ | 107 | @r###" |
108 | CompletionItem { | 108 | [ |
109 | label: "box", | 109 | CompletionItem { |
110 | source_range: [89; 89), | 110 | label: "box", |
111 | delete: [85; 89), | 111 | source_range: [89; 89), |
112 | insert: "Box::new(bar)", | 112 | delete: [85; 89), |
113 | detail: "Box::new(expr)", | 113 | insert: "Box::new(bar)", |
114 | }, | 114 | detail: "Box::new(expr)", |
115 | CompletionItem { | 115 | }, |
116 | label: "dbg", | 116 | CompletionItem { |
117 | source_range: [89; 89), | 117 | label: "dbg", |
118 | delete: [85; 89), | 118 | source_range: [89; 89), |
119 | insert: "dbg!(bar)", | 119 | delete: [85; 89), |
120 | detail: "dbg!(expr)", | 120 | insert: "dbg!(bar)", |
121 | }, | 121 | detail: "dbg!(expr)", |
122 | CompletionItem { | 122 | }, |
123 | label: "if", | 123 | CompletionItem { |
124 | source_range: [89; 89), | 124 | label: "if", |
125 | delete: [85; 89), | 125 | source_range: [89; 89), |
126 | insert: "if bar {$0}", | 126 | delete: [85; 89), |
127 | detail: "if expr {}", | 127 | insert: "if bar {$0}", |
128 | }, | 128 | detail: "if expr {}", |
129 | CompletionItem { | 129 | }, |
130 | label: "match", | 130 | CompletionItem { |
131 | source_range: [89; 89), | 131 | label: "match", |
132 | delete: [85; 89), | 132 | source_range: [89; 89), |
133 | insert: "match bar {\n ${1:_} => {$0\\},\n}", | 133 | delete: [85; 89), |
134 | detail: "match expr {}", | 134 | insert: "match bar {\n ${1:_} => {$0\\},\n}", |
135 | }, | 135 | detail: "match expr {}", |
136 | CompletionItem { | 136 | }, |
137 | label: "not", | 137 | CompletionItem { |
138 | source_range: [89; 89), | 138 | label: "not", |
139 | delete: [85; 89), | 139 | source_range: [89; 89), |
140 | insert: "!bar", | 140 | delete: [85; 89), |
141 | detail: "!expr", | 141 | insert: "!bar", |
142 | }, | 142 | detail: "!expr", |
143 | CompletionItem { | 143 | }, |
144 | label: "ref", | 144 | CompletionItem { |
145 | source_range: [89; 89), | 145 | label: "ref", |
146 | delete: [85; 89), | 146 | source_range: [89; 89), |
147 | insert: "&bar", | 147 | delete: [85; 89), |
148 | detail: "&expr", | 148 | insert: "&bar", |
149 | }, | 149 | detail: "&expr", |
150 | CompletionItem { | 150 | }, |
151 | label: "refm", | 151 | CompletionItem { |
152 | source_range: [89; 89), | 152 | label: "refm", |
153 | delete: [85; 89), | 153 | source_range: [89; 89), |
154 | insert: "&mut bar", | 154 | delete: [85; 89), |
155 | detail: "&mut expr", | 155 | insert: "&mut bar", |
156 | }, | 156 | detail: "&mut expr", |
157 | CompletionItem { | 157 | }, |
158 | label: "while", | 158 | CompletionItem { |
159 | source_range: [89; 89), | 159 | label: "while", |
160 | delete: [85; 89), | 160 | source_range: [89; 89), |
161 | insert: "while bar {\n$0\n}", | 161 | delete: [85; 89), |
162 | detail: "while expr {}", | 162 | insert: "while bar {\n$0\n}", |
163 | }, | 163 | detail: "while expr {}", |
164 | ]"### | 164 | }, |
165 | ] | ||
166 | "### | ||
165 | ); | 167 | ); |
166 | } | 168 | } |
167 | 169 | ||
@@ -176,50 +178,52 @@ mod tests { | |||
176 | } | 178 | } |
177 | "#, | 179 | "#, |
178 | ), | 180 | ), |
179 | @r###"[ | 181 | @r###" |
180 | CompletionItem { | 182 | [ |
181 | label: "box", | 183 | CompletionItem { |
182 | source_range: [91; 91), | 184 | label: "box", |
183 | delete: [87; 91), | 185 | source_range: [91; 91), |
184 | insert: "Box::new(bar)", | 186 | delete: [87; 91), |
185 | detail: "Box::new(expr)", | 187 | insert: "Box::new(bar)", |
186 | }, | 188 | detail: "Box::new(expr)", |
187 | CompletionItem { | 189 | }, |
188 | label: "dbg", | 190 | CompletionItem { |
189 | source_range: [91; 91), | 191 | label: "dbg", |
190 | delete: [87; 91), | 192 | source_range: [91; 91), |
191 | insert: "dbg!(bar)", | 193 | delete: [87; 91), |
192 | detail: "dbg!(expr)", | 194 | insert: "dbg!(bar)", |
193 | }, | 195 | detail: "dbg!(expr)", |
194 | CompletionItem { | 196 | }, |
195 | label: "match", | 197 | CompletionItem { |
196 | source_range: [91; 91), | 198 | label: "match", |
197 | delete: [87; 91), | 199 | source_range: [91; 91), |
198 | insert: "match bar {\n ${1:_} => {$0\\},\n}", | 200 | delete: [87; 91), |
199 | detail: "match expr {}", | 201 | insert: "match bar {\n ${1:_} => {$0\\},\n}", |
200 | }, | 202 | detail: "match expr {}", |
201 | CompletionItem { | 203 | }, |
202 | label: "not", | 204 | CompletionItem { |
203 | source_range: [91; 91), | 205 | label: "not", |
204 | delete: [87; 91), | 206 | source_range: [91; 91), |
205 | insert: "!bar", | 207 | delete: [87; 91), |
206 | detail: "!expr", | 208 | insert: "!bar", |
207 | }, | 209 | detail: "!expr", |
208 | CompletionItem { | 210 | }, |
209 | label: "ref", | 211 | CompletionItem { |
210 | source_range: [91; 91), | 212 | label: "ref", |
211 | delete: [87; 91), | 213 | source_range: [91; 91), |
212 | insert: "&bar", | 214 | delete: [87; 91), |
213 | detail: "&expr", | 215 | insert: "&bar", |
214 | }, | 216 | detail: "&expr", |
215 | CompletionItem { | 217 | }, |
216 | label: "refm", | 218 | CompletionItem { |
217 | source_range: [91; 91), | 219 | label: "refm", |
218 | delete: [87; 91), | 220 | source_range: [91; 91), |
219 | insert: "&mut bar", | 221 | delete: [87; 91), |
220 | detail: "&mut expr", | 222 | insert: "&mut bar", |
221 | }, | 223 | detail: "&mut expr", |
222 | ]"### | 224 | }, |
225 | ] | ||
226 | "### | ||
223 | ); | 227 | ); |
224 | } | 228 | } |
225 | 229 | ||
@@ -233,50 +237,52 @@ mod tests { | |||
233 | } | 237 | } |
234 | "#, | 238 | "#, |
235 | ), | 239 | ), |
236 | @r###"[ | 240 | @r###" |
237 | CompletionItem { | 241 | [ |
238 | label: "box", | 242 | CompletionItem { |
239 | source_range: [52; 52), | 243 | label: "box", |
240 | delete: [49; 52), | 244 | source_range: [52; 52), |
241 | insert: "Box::new(42)", | 245 | delete: [49; 52), |
242 | detail: "Box::new(expr)", | 246 | insert: "Box::new(42)", |
243 | }, | 247 | detail: "Box::new(expr)", |
244 | CompletionItem { | 248 | }, |
245 | label: "dbg", | 249 | CompletionItem { |
246 | source_range: [52; 52), | 250 | label: "dbg", |
247 | delete: [49; 52), | 251 | source_range: [52; 52), |
248 | insert: "dbg!(42)", | 252 | delete: [49; 52), |
249 | detail: "dbg!(expr)", | 253 | insert: "dbg!(42)", |
250 | }, | 254 | detail: "dbg!(expr)", |
251 | CompletionItem { | 255 | }, |
252 | label: "match", | 256 | CompletionItem { |
253 | source_range: [52; 52), | 257 | label: "match", |
254 | delete: [49; 52), | 258 | source_range: [52; 52), |
255 | insert: "match 42 {\n ${1:_} => {$0\\},\n}", | 259 | delete: [49; 52), |
256 | detail: "match expr {}", | 260 | insert: "match 42 {\n ${1:_} => {$0\\},\n}", |
257 | }, | 261 | detail: "match expr {}", |
258 | CompletionItem { | 262 | }, |
259 | label: "not", | 263 | CompletionItem { |
260 | source_range: [52; 52), | 264 | label: "not", |
261 | delete: [49; 52), | 265 | source_range: [52; 52), |
262 | insert: "!42", | 266 | delete: [49; 52), |
263 | detail: "!expr", | 267 | insert: "!42", |
264 | }, | 268 | detail: "!expr", |
265 | CompletionItem { | 269 | }, |
266 | label: "ref", | 270 | CompletionItem { |
267 | source_range: [52; 52), | 271 | label: "ref", |
268 | delete: [49; 52), | 272 | source_range: [52; 52), |
269 | insert: "&42", | 273 | delete: [49; 52), |
270 | detail: "&expr", | 274 | insert: "&42", |
271 | }, | 275 | detail: "&expr", |
272 | CompletionItem { | 276 | }, |
273 | label: "refm", | 277 | CompletionItem { |
274 | source_range: [52; 52), | 278 | label: "refm", |
275 | delete: [49; 52), | 279 | source_range: [52; 52), |
276 | insert: "&mut 42", | 280 | delete: [49; 52), |
277 | detail: "&mut expr", | 281 | insert: "&mut 42", |
278 | }, | 282 | detail: "&mut expr", |
279 | ]"### | 283 | }, |
284 | ] | ||
285 | "### | ||
280 | ); | 286 | ); |
281 | } | 287 | } |
282 | } | 288 | } |