diff options
| author | bors <bors@rust-lang.org> | 2017-04-19 01:27:08 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2017-04-19 01:27:08 +0000 |
| commit | 84be2df0e9dac63a4e730c4f5652deb872060ad8 (patch) | |
| tree | b3df9b50b25e5689a592be81c7f691c2e325e9f0 /src/test/run-pass/thinlto | |
| parent | 9f2abadca2d065bf81772cb84981d0a22d8e98b3 (diff) | |
| parent | 3092ac40b617ec26dc03cd56558267be03c25cbd (diff) | |
| download | rust-84be2df0e9dac63a4e730c4f5652deb872060ad8.tar.gz rust-84be2df0e9dac63a4e730c4f5652deb872060ad8.zip | |
Auto merge of #41236 - cengizIO:master, r=nikomatsakis
Move E0101 and E0102 logic into new E0282 mechanism #40013
Hello there!
## What's this?
Previously, me and @nikomatsakis worked on error messages of uninferred locals. (#38812)
This aims to build up on that by moving certain type checks from `writeback`.
With this, `E0101` and `E0102` errors are getting obsoleted and no longer thrown.
They're replaced with customized versions of `E0282`s instead.
## Sample Error Messages
#### `E0101` is getting converted into:
```rust
error[E0282]: type annotations needed
--> test.rs:2:14
|
2 | let x = |_| {};
| ^ consider giving this closure parameter a type
error: aborting due to previous error
```
#### `E0102` is getting converted into:
```rust
error[E0282]: type annotations needed
--> test.rs:2:9
|
2 | let x = [];
| ^
| |
| consider giving `x` a type
| cannot infer type for `[_; 0]`
error: aborting due to previous error
```
## Annoyances
- I think we need to change our way of type name resolving in relevant places, because that `[_; 0]` looks horrible IMHO.
- I'm not terribly happy with the note ordering of errors. So please do point to code that might help me accomplish this.
## Tests
Tests of `E0101` and `E0102` are getting converted from `compile-fail` to `ui` tests.
## Documentation
Please help me with documentation update. There are some confusing places that needed an update but I'm not sure if I did the right ones.
Please do comment on messages, layouts and other details.
## Appreciation
Huge thanks goes to @nikomatsakis for being a patient and humble mentor along this long journey. 🍻
Diffstat (limited to 'src/test/run-pass/thinlto')
0 files changed, 0 insertions, 0 deletions
