rust/src/librustc_errors
bors d2d8ae6575 Auto merge of #39214 - estebank:fix-labels-without-msg, r=nikomatsakis
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, @nrc
2017-01-24 11:51:34 +00:00
..
Cargo.toml Remove unused extern crates. 2017-01-22 01:31:02 +00:00
diagnostic_builder.rs Teach diagnostics to correct margin on multiline messages 2017-01-08 16:07:14 -08:00
diagnostic.rs Teach Diagnostics to highlight text 2017-01-17 14:28:53 -08:00
emitter.rs Auto merge of #39214 - estebank:fix-labels-without-msg, r=nikomatsakis 2017-01-24 11:51:34 +00:00
lib.rs Remove unused extern crates. 2017-01-22 01:31:02 +00:00
lock.rs run rustfmt on librustc_errors folder 2016-10-18 23:13:02 +05:30
registry.rs run rustfmt on librustc_errors folder 2016-10-18 23:13:02 +05:30
snippet.rs Auto merge of #39214 - estebank:fix-labels-without-msg, r=nikomatsakis 2017-01-24 11:51:34 +00:00
styled_buffer.rs run rustfmt on librustc_errors folder 2016-10-18 23:13:02 +05:30