Commit 4ed9500
committed
Auto merge of rust-lang#41245 - estebank:multiline-trim, r=nikomatsakis
Reduce visual clutter of multiline start when possible
When a span starts on a line with nothing but whitespace to the left,
and there are no other annotations in that line, simplify the visual
representation of the span.
Go from:
```rust
error[E0072]: recursive type `A` has infinite size
--> file2.rs:1:1
|
1 | struct A {
| _^ starting here...
2 | | a: A,
3 | | }
| |_^ ...ending here: recursive type has infinite size
|
```
To:
```rust
error[E0072]: recursive type `A` has infinite size
--> file2.rs:1:1
|
1 | / struct A {
2 | | a: A,
3 | | }
| |_^ recursive type has infinite size
```
Re: rust-lang#38246.
r? @nikomatsakis CC @jonathandturnerFile tree
26 files changed
+200
-179
lines changed- src
- librustc_errors
- libsyntax
- test/ui
- compare-method
- did_you_mean
- dropck
- issue-37311-type-length-limit
- lifetime-errors
- mismatched_types
- missing-items
- span
- type-check
26 files changed
+200
-179
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
263 | 263 | | |
264 | 264 | | |
265 | 265 | | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
266 | 301 | | |
267 | 302 | | |
268 | 303 | | |
| |||
355 | 390 | | |
356 | 391 | | |
357 | 392 | | |
358 | | - | |
359 | | - | |
360 | | - | |
361 | | - | |
| 393 | + | |
| 394 | + | |
362 | 395 | | |
363 | 396 | | |
364 | 397 | | |
| |||
374 | 407 | | |
375 | 408 | | |
376 | 409 | | |
377 | | - | |
| 410 | + | |
378 | 411 | | |
379 | 412 | | |
380 | 413 | | |
| |||
383 | 416 | | |
384 | 417 | | |
385 | 418 | | |
386 | | - | |
387 | | - | |
388 | 419 | | |
389 | | - | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
390 | 429 | | |
| 430 | + | |
391 | 431 | | |
392 | 432 | | |
393 | 433 | | |
| |||
397 | 437 | | |
398 | 438 | | |
399 | 439 | | |
| 440 | + | |
400 | 441 | | |
401 | 442 | | |
402 | 443 | | |
| |||
480 | 521 | | |
481 | 522 | | |
482 | 523 | | |
483 | | - | |
| 524 | + | |
484 | 525 | | |
485 | 526 | | |
486 | 527 | | |
| |||
514 | 555 | | |
515 | 556 | | |
516 | 557 | | |
517 | | - | |
| 558 | + | |
518 | 559 | | |
519 | 560 | | |
520 | 561 | | |
521 | 562 | | |
522 | | - | |
| 563 | + | |
523 | 564 | | |
524 | 565 | | |
525 | 566 | | |
| |||
557 | 598 | | |
558 | 599 | | |
559 | 600 | | |
560 | | - | |
| 601 | + | |
561 | 602 | | |
562 | 603 | | |
563 | 604 | | |
564 | 605 | | |
565 | | - | |
| 606 | + | |
566 | 607 | | |
567 | 608 | | |
568 | 609 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
66 | | - | |
| 66 | + | |
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
| 76 | + | |
80 | 77 | | |
81 | 78 | | |
82 | 79 | | |
| |||
106 | 103 | | |
107 | 104 | | |
108 | 105 | | |
109 | | - | |
110 | | - | |
111 | | - | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
112 | 109 | | |
113 | 110 | | |
114 | 111 | | |
| |||
189 | 186 | | |
190 | 187 | | |
191 | 188 | | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
192 | 198 | | |
193 | 199 | | |
194 | 200 | | |
| |||
0 commit comments