Commit 774e60b
committed
Prettify mismatched types error message in a special case
Type parameters are referenced in the error message after the previous
few commits (using span label). But when the main error message already
references the very same type parameter it becomes clumsy. Do not show
the additional label in this case as per code review comment by
@estebank.
Also this contains a small style fix.1 parent 4e10b75 commit 774e60b
File tree
3 files changed
+18
-20
lines changed- src
- librustc
- infer/error_reporting
- ty
- test/ui/impl-trait
3 files changed
+18
-20
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1194 | 1194 | | |
1195 | 1195 | | |
1196 | 1196 | | |
1197 | | - | |
1198 | | - | |
1199 | | - | |
1200 | | - | |
| 1197 | + | |
| 1198 | + | |
| 1199 | + | |
| 1200 | + | |
1201 | 1201 | | |
1202 | 1202 | | |
1203 | 1203 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
291 | 291 | | |
292 | 292 | | |
293 | 293 | | |
294 | | - | |
295 | | - | |
296 | | - | |
297 | | - | |
298 | | - | |
299 | | - | |
300 | | - | |
301 | | - | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
302 | 302 | | |
303 | 303 | | |
304 | 304 | | |
| |||
313 | 313 | | |
314 | 314 | | |
315 | 315 | | |
316 | | - | |
317 | | - | |
318 | | - | |
319 | | - | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
320 | 320 | | |
321 | 321 | | |
322 | 322 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
| 8 | + | |
| 9 | + | |
12 | 10 | | |
13 | 11 | | |
14 | 12 | | |
| |||
0 commit comments