diff options
| author | Esteban Küber <esteban@kuber.com.ar> | 2019-05-30 10:19:58 -0700 |
|---|---|---|
| committer | Esteban Küber <esteban@kuber.com.ar> | 2019-05-31 18:33:59 -0700 |
| commit | 8bb094dac596a98cd3347979984834fe67bf3fcb (patch) | |
| tree | 47aaf9ba899ba93541dc261700c641d90ba62b33 /src/test/ui/thinlto | |
| parent | 7840a0b753a065a41999f1fb6028f67d33e3fdd5 (diff) | |
| download | rust-8bb094dac596a98cd3347979984834fe67bf3fcb.tar.gz rust-8bb094dac596a98cd3347979984834fe67bf3fcb.zip | |
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 for `std::vec::Vec<_>`
--> $DIR/vector-no-ann.rs:2:16
|
LL | let foo = Vec::new();
| --- ^^^^^^^^ cannot infer type for `T`
| |
| consider giving `foo` the type `std::vec::Vec<_>` with the type parameter `T` specified
```
We still need to modify type printing to optionally accept a
`TypeVariableTable` in order to properly print `std::vec::Vec<T>`.
CC #25633.
Diffstat (limited to 'src/test/ui/thinlto')
0 files changed, 0 insertions, 0 deletions
