Uh oh!
There was an error while loading. Please reload this page.
Fix multiple labels when some don't have message - #39214
Conversation
The diagnostic emitter now accounts for labels with no text message,
presenting the underline on its own, without drawing the line for the
non existing message below it. Go from
```
error: foo
--> test.rs:3:6
|
3 | a { b { c } d }
| ----^^^^^^^----
| | |
| | `b` is a good letter
|
```
to
```
error: foo
--> test.rs:3:6
|
3 | a { b { c } d }
| ----^^^^^^^----
| |
| `b` is a good letter
```
and from
```
error: foo
--> test.rs:3:6
|
3 | a { b { c } d }
| ^^^^-------^^^^
| | |
| |
| `a` is a good letter
```
to
```
error: foo
--> test.rs:3:6
|
3 | a { b { c } d }
| ^^^^-------^^^^ `a` is a good letter
```estebank
commented
Jan 21, 2017
For an example of what this bug actually looks like in practice (taken from #39202): The presentation logic should still allow for labels without messages with a reasonable output. Given that, the proper thing to do is to not have labels without a message, specially when multiple labels might overlap. Cases that would now be shown in this way might actually be masking Thankfully, this is a very contrived example. |
GuillaumeGomez
commented
Jan 21, 2017
This is really great! 👍 |
nikomatsakis
commented
Jan 23, 2017
@bors r+ |
bors
commented
Jan 23, 2017
📌 Commit 469ecef has been approved by |
bors
commented
Jan 23, 2017
Fix multiple labels when some don't have message
The diagnostic emitter now accounts for labels with no text message, presenting the underline on its own, without drawing the line for the non existing message below it. Go from
```
error: foo
--> test.rs:3:6
|
3 | a { b { c } d }
| ----^^^^^^^----
| | |
| | `b` is a good letter
|
```
to
```
error: foo
--> test.rs:3:6
|
3 | a { b { c } d }
| ----^^^^^^^----
| |
| `b` is a good letter
```
from
```
error: foo
--> test.rs:3:6
|
3 | a { b { c } d }
| ^^^^-------^^^^
| | |
| |
| `a` is a good letter
```
to
```
error: foo
--> test.rs:3:6
|
3 | a { b { c } d }
| ^^^^-------^^^^ `a` is a good letter
```
and from
```
error: foo
--> test.rs:3:6
|
3 | a { b { c } d }
| ^^^^-------^^^^
| | |
| |
|
```
to
```
error: foo
--> test.rs:3:6
|
3 | a { b { c } d }
| ^^^^-------^^^^
```
r? @nikomatsakis
cc @jonathandturner, @GuillaumeGomez, @nrcbors
commented
Jan 23, 2017
💔 Test failed - status-travis |
alexcrichton
commented
Jan 23, 2017
via email
| … On Mon, Jan 23, 2017 at 2:37 PM, bors ***@***.***> wrote:
💔 Test failed - status-travis
<https://travis-ci.org/rust-lang/rust/builds/194605255>
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#39214 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAD95OUGf7JOXRDKnQButLmk4H0L4YAAks5rVSu8gaJpZM4Lp9-e>
.
|
bors
commented
Jan 24, 2017
⌛ Testing commit 469ecef with merge 067221f... |
bors
commented
Jan 24, 2017
💔 Test failed - status-travis |
alexcrichton
commented
Jan 24, 2017
via email
@bors: retry
* apparent travis bug... …On Mon, Jan 23, 2017 at 7:42 PM, bors ***@***.***> wrote:
💔 Test failed - status-travis
<https://travis-ci.org/rust-lang/rust/builds/194701054>
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#39214 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAD95FHElkRuR4Xoq_5LfdWh09vWLJHPks5rVXMtgaJpZM4Lp9-e>
.
|
bors
commented
Jan 24, 2017
⌛ Testing commit 469ecef with merge d2d8ae6... |
Fix multiple labels when some don't have message
The diagnostic emitter now accounts for labels with no text message, presenting the underline on its own, without drawing the line for the non existing message below it. Go from
```
error: foo
--> test.rs:3:6
|
3 | a { b { c } d }
| ----^^^^^^^----
| | |
| | `b` is a good letter
|
```
to
```
error: foo
--> test.rs:3:6
|
3 | a { b { c } d }
| ----^^^^^^^----
| |
| `b` is a good letter
```
from
```
error: foo
--> test.rs:3:6
|
3 | a { b { c } d }
| ^^^^-------^^^^
| | |
| |
| `a` is a good letter
```
to
```
error: foo
--> test.rs:3:6
|
3 | a { b { c } d }
| ^^^^-------^^^^ `a` is a good letter
```
and from
```
error: foo
--> test.rs:3:6
|
3 | a { b { c } d }
| ^^^^-------^^^^
| | |
| |
|
```
to
```
error: foo
--> test.rs:3:6
|
3 | a { b { c } d }
| ^^^^-------^^^^
```
r? @nikomatsakis
cc @jonathandturner, @GuillaumeGomez, @nrcbors
commented
Jan 24, 2017
☀️ Test successful - status-appveyor, status-travis |

The diagnostic emitter now accounts for labels with no text message, presenting the underline on its own, without drawing the line for the non existing message below it. Go from
to
from
to
and from
to
r? @nikomatsakis
cc @jonathandturner, @GuillaumeGomez, @nrc