diff options
| author | bors <bors@rust-lang.org> | 2019-06-03 02:45:35 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2019-06-03 02:45:35 +0000 |
| commit | d59dcb261ecdc47d8afaac532050dadf86f3c898 (patch) | |
| tree | 49c24f0e4cdfb7b6edd7e2e6300e0679b952c28f /src/libsyntax/source_map.rs | |
| parent | 3a6bef0cbd01227bbcf593e8504164120a984fdc (diff) | |
| parent | e420f4410ba44b3e39f54c755f456f4f65406e25 (diff) | |
| download | rust-d59dcb261ecdc47d8afaac532050dadf86f3c898.tar.gz rust-d59dcb261ecdc47d8afaac532050dadf86f3c898.zip | |
Auto merge of #61361 - estebank:infer-type, r=varkor
Add more detail to type inference error
When encountering code where type inference fails, add more actionable
information:
```
fn main() {
let foo = Vec::new();
}
```
```
error[E0282]: type annotations needed in `std::vec::Vec<T>`
--> $DIR/vector-no-ann.rs:2:16
|
LL | let foo = Vec::new();
| --- ^^^^^^^^ cannot infer type for `T` in `std::vec::Vec<T>`
| |
| consider giving `foo` a type
```
Fix #25633.
Diffstat (limited to 'src/libsyntax/source_map.rs')
0 files changed, 0 insertions, 0 deletions
