diff options
author | Aleksey Kladov <[email protected]> | 2020-06-23 23:48:38 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2020-06-23 23:48:38 +0100 |
commit | d016cb486738c1ab2574a322924183fa8a870b06 (patch) | |
tree | 841871b66bc008a18a5a1053f5a33415c3a54ad9 /crates/ra_hir_ty/src/tests/never_type.rs | |
parent | e5101ae150db5faa7ddf8393e375032ef371f5e5 (diff) |
Use only one code-path for parsing fixtures
This removes leading newlines everywhere, shifting all ranges in tests
by one
Diffstat (limited to 'crates/ra_hir_ty/src/tests/never_type.rs')
-rw-r--r-- | crates/ra_hir_ty/src/tests/never_type.rs | 190 |
1 files changed, 95 insertions, 95 deletions
diff --git a/crates/ra_hir_ty/src/tests/never_type.rs b/crates/ra_hir_ty/src/tests/never_type.rs index 082c47208..ab9a990f5 100644 --- a/crates/ra_hir_ty/src/tests/never_type.rs +++ b/crates/ra_hir_ty/src/tests/never_type.rs | |||
@@ -291,40 +291,40 @@ fn test6() { | |||
291 | true, | 291 | true, |
292 | ); | 292 | ); |
293 | assert_snapshot!(t, @r###" | 293 | assert_snapshot!(t, @r###" |
294 | 25..53 '{ ...urn; }': () | 294 | 11..39 '{ ...urn; }': () |
295 | 35..36 'x': u32 | 295 | 21..22 'x': u32 |
296 | 44..50 'return': ! | 296 | 30..36 'return': ! |
297 | 65..98 '{ ...; }; }': () | 297 | 51..84 '{ ...; }; }': () |
298 | 75..76 'x': u32 | 298 | 61..62 'x': u32 |
299 | 84..95 '{ return; }': u32 | 299 | 70..81 '{ return; }': u32 |
300 | 86..92 'return': ! | 300 | 72..78 'return': ! |
301 | 110..139 '{ ... {}; }': () | 301 | 96..125 '{ ... {}; }': () |
302 | 120..121 'x': u32 | 302 | 106..107 'x': u32 |
303 | 129..136 'loop {}': ! | 303 | 115..122 'loop {}': ! |
304 | 134..136 '{}': () | 304 | 120..122 '{}': () |
305 | 151..184 '{ ...} }; }': () | 305 | 137..170 '{ ...} }; }': () |
306 | 161..162 'x': u32 | 306 | 147..148 'x': u32 |
307 | 170..181 '{ loop {} }': u32 | 307 | 156..167 '{ loop {} }': u32 |
308 | 172..179 'loop {}': ! | 308 | 158..165 'loop {}': ! |
309 | 177..179 '{}': () | 309 | 163..165 '{}': () |
310 | 196..260 '{ ...} }; }': () | 310 | 182..246 '{ ...} }; }': () |
311 | 206..207 'x': u32 | 311 | 192..193 'x': u32 |
312 | 215..257 '{ if t...}; } }': u32 | 312 | 201..243 '{ if t...}; } }': u32 |
313 | 217..255 'if tru... {}; }': u32 | 313 | 203..241 'if tru... {}; }': u32 |
314 | 220..224 'true': bool | 314 | 206..210 'true': bool |
315 | 225..237 '{ loop {}; }': u32 | 315 | 211..223 '{ loop {}; }': u32 |
316 | 227..234 'loop {}': ! | 316 | 213..220 'loop {}': ! |
317 | 232..234 '{}': () | 317 | 218..220 '{}': () |
318 | 243..255 '{ loop {}; }': u32 | 318 | 229..241 '{ loop {}; }': u32 |
319 | 245..252 'loop {}': ! | 319 | 231..238 'loop {}': ! |
320 | 250..252 '{}': () | 320 | 236..238 '{}': () |
321 | 272..324 '{ ...; }; }': () | 321 | 258..310 '{ ...; }; }': () |
322 | 282..283 'x': u32 | 322 | 268..269 'x': u32 |
323 | 291..321 '{ let ...; }; }': u32 | 323 | 277..307 '{ let ...; }; }': u32 |
324 | 297..298 'y': u32 | 324 | 283..284 'y': u32 |
325 | 306..318 '{ loop {}; }': u32 | 325 | 292..304 '{ loop {}; }': u32 |
326 | 308..315 'loop {}': ! | 326 | 294..301 'loop {}': ! |
327 | 313..315 '{}': () | 327 | 299..301 '{}': () |
328 | "###); | 328 | "###); |
329 | } | 329 | } |
330 | 330 | ||
@@ -341,14 +341,14 @@ fn test1() { | |||
341 | true, | 341 | true, |
342 | ); | 342 | ); |
343 | assert_snapshot!(t, @r###" | 343 | assert_snapshot!(t, @r###" |
344 | 25..98 '{ ..." }; }': () | 344 | 11..84 '{ ..." }; }': () |
345 | 68..69 'x': u32 | 345 | 54..55 'x': u32 |
346 | 77..95 '{ loop...foo" }': &str | 346 | 63..81 '{ loop...foo" }': &str |
347 | 79..86 'loop {}': ! | 347 | 65..72 'loop {}': ! |
348 | 84..86 '{}': () | 348 | 70..72 '{}': () |
349 | 88..93 '"foo"': &str | 349 | 74..79 '"foo"': &str |
350 | 77..95: expected u32, got &str | 350 | 63..81: expected u32, got &str |
351 | 88..93: expected u32, got &str | 351 | 74..79: expected u32, got &str |
352 | "###); | 352 | "###); |
353 | } | 353 | } |
354 | 354 | ||
@@ -381,58 +381,58 @@ fn test3() { | |||
381 | true, | 381 | true, |
382 | ); | 382 | ); |
383 | assert_snapshot!(t, @r###" | 383 | assert_snapshot!(t, @r###" |
384 | 25..99 '{ ...} }; }': () | 384 | 11..85 '{ ...} }; }': () |
385 | 68..69 'x': u32 | 385 | 54..55 'x': u32 |
386 | 77..96 '{ loop...k; } }': () | 386 | 63..82 '{ loop...k; } }': () |
387 | 79..94 'loop { break; }': () | 387 | 65..80 'loop { break; }': () |
388 | 84..94 '{ break; }': () | 388 | 70..80 '{ break; }': () |
389 | 86..91 'break': ! | 389 | 72..77 'break': ! |
390 | 77..96: expected u32, got () | 390 | 63..82: expected u32, got () |
391 | 79..94: expected u32, got () | 391 | 65..80: expected u32, got () |
392 | 111..357 '{ ...; }; }': () | 392 | 97..343 '{ ...; }; }': () |
393 | 154..155 'x': u32 | 393 | 140..141 'x': u32 |
394 | 163..189 '{ for ...; }; }': () | 394 | 149..175 '{ for ...; }; }': () |
395 | 165..186 'for a ...eak; }': () | 395 | 151..172 'for a ...eak; }': () |
396 | 169..170 'a': {unknown} | 396 | 155..156 'a': {unknown} |
397 | 174..175 'b': {unknown} | 397 | 160..161 'b': {unknown} |
398 | 176..186 '{ break; }': () | 398 | 162..172 '{ break; }': () |
399 | 178..183 'break': ! | 399 | 164..169 'break': ! |
400 | 240..241 'x': u32 | 400 | 226..227 'x': u32 |
401 | 249..267 '{ for ... {}; }': () | 401 | 235..253 '{ for ... {}; }': () |
402 | 251..264 'for a in b {}': () | 402 | 237..250 'for a in b {}': () |
403 | 255..256 'a': {unknown} | 403 | 241..242 'a': {unknown} |
404 | 260..261 'b': {unknown} | 404 | 246..247 'b': {unknown} |
405 | 262..264 '{}': () | 405 | 248..250 '{}': () |
406 | 318..319 'x': u32 | 406 | 304..305 'x': u32 |
407 | 327..354 '{ for ...; }; }': () | 407 | 313..340 '{ for ...; }; }': () |
408 | 329..351 'for a ...urn; }': () | 408 | 315..337 'for a ...urn; }': () |
409 | 333..334 'a': {unknown} | 409 | 319..320 'a': {unknown} |
410 | 338..339 'b': {unknown} | 410 | 324..325 'b': {unknown} |
411 | 340..351 '{ return; }': () | 411 | 326..337 '{ return; }': () |
412 | 342..348 'return': ! | 412 | 328..334 'return': ! |
413 | 163..189: expected u32, got () | 413 | 149..175: expected u32, got () |
414 | 249..267: expected u32, got () | 414 | 235..253: expected u32, got () |
415 | 327..354: expected u32, got () | 415 | 313..340: expected u32, got () |
416 | 369..668 '{ ...; }; }': () | 416 | 355..654 '{ ...; }; }': () |
417 | 412..413 'x': u32 | 417 | 398..399 'x': u32 |
418 | 421..447 '{ whil...; }; }': () | 418 | 407..433 '{ whil...; }; }': () |
419 | 423..444 'while ...eak; }': () | 419 | 409..430 'while ...eak; }': () |
420 | 429..433 'true': bool | 420 | 415..419 'true': bool |
421 | 434..444 '{ break; }': () | 421 | 420..430 '{ break; }': () |
422 | 436..441 'break': ! | 422 | 422..427 'break': ! |
423 | 551..552 'x': u32 | 423 | 537..538 'x': u32 |
424 | 560..578 '{ whil... {}; }': () | 424 | 546..564 '{ whil... {}; }': () |
425 | 562..575 'while true {}': () | 425 | 548..561 'while true {}': () |
426 | 568..572 'true': bool | 426 | 554..558 'true': bool |
427 | 573..575 '{}': () | 427 | 559..561 '{}': () |
428 | 629..630 'x': u32 | 428 | 615..616 'x': u32 |
429 | 638..665 '{ whil...; }; }': () | 429 | 624..651 '{ whil...; }; }': () |
430 | 640..662 'while ...urn; }': () | 430 | 626..648 'while ...urn; }': () |
431 | 646..650 'true': bool | 431 | 632..636 'true': bool |
432 | 651..662 '{ return; }': () | 432 | 637..648 '{ return; }': () |
433 | 653..659 'return': ! | 433 | 639..645 'return': ! |
434 | 421..447: expected u32, got () | 434 | 407..433: expected u32, got () |
435 | 560..578: expected u32, got () | 435 | 546..564: expected u32, got () |
436 | 638..665: expected u32, got () | 436 | 624..651: expected u32, got () |
437 | "###); | 437 | "###); |
438 | } | 438 | } |