]> git.lizzy.rs Git - rust.git/commit
Teach diagnostics to have correctly padded lists
authorEsteban Küber <esteban@kuber.com.ar>
Sun, 8 Jan 2017 05:12:33 +0000 (21:12 -0800)
committerEsteban Küber <esteban@kuber.com.ar>
Sun, 8 Jan 2017 07:34:37 +0000 (23:34 -0800)
commit43b10fa8ed3dd96684ec89812dc7810431cd0d01
tree03a3a7fc2fb16d35528bd70d8aefc4a840642f4b
parent7e38a89a7b970181be083691504825a23e6b0a0f
Teach diagnostics to have correctly padded lists

Make the suggestion list have a correct padding:

```
error[E0308]: mismatched types
 --> file.rs:3:20
  |
3 |     let x: usize = "";
  |                    ^^ expected usize, found reference
  |
  = note: expected type `usize`
  = note:    found type `&'static str`
  = help: here are some functions which might fulfill your needs:
          - .len()
          - .foo()
          - .bar()
```
src/librustc_errors/diagnostic.rs
src/librustc_errors/diagnostic_builder.rs
src/librustc_errors/emitter.rs
src/librustc_typeck/check/demand.rs
src/test/ui/resolve/token-error-correct-3.stderr
src/test/ui/span/coerce-suggestions.stderr