]> git.lizzy.rs Git - rust.git/commit
Auto merge of #40851 - oli-obk:multisugg, r=jonathandturner
authorbors <bors@rust-lang.org>
Tue, 2 May 2017 01:04:27 +0000 (01:04 +0000)
committerbors <bors@rust-lang.org>
Tue, 2 May 2017 01:04:27 +0000 (01:04 +0000)
commit33535afda497e1de8a831e8270ae8099434f662b
tree17b14bd7f6ab382784b26bdf01722525d3bbdb2f
parentde4bdd20f87d95d164c883dc141a2763e4df155a
parentd64af4a627532c978ed2682de0e9411aa3a83e75
Auto merge of #40851 - oli-obk:multisugg, r=jonathandturner

Minimize single span suggestions into a label

changes

```
14 |     println!("☃{}", tup[0]);
   |                     ^^^^^^
   |
help: to access tuple elements, use tuple indexing syntax as shown
   |     println!("☃{}", tup.0);
```

into

```
14 |     println!("☃{}", tup[0]);
   |                     ^^^^^^ to access tuple elements, use `tup.0`
```

Also makes suggestions explicit in the backend in preparation of adding multiple suggestions to a single diagnostic. Currently that's already possible, but results in a full help message + modified code snippet per suggestion, and has no rate limit (might show 100+ suggestions).
src/librustc_errors/lib.rs
src/librustc_typeck/check/mod.rs
src/librustc_typeck/check/op.rs
src/libsyntax/json.rs
src/libsyntax/parse/parser.rs