diff options
| author | bors <bors@rust-lang.org> | 2017-11-08 20:00:41 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2017-11-08 20:00:41 +0000 |
| commit | 02004ef78383cb174a41df7735a552823fa10b90 (patch) | |
| tree | 13ac8f02bd76e0479917b424dbe0d33a15dd611b /src/rustllvm/ArchiveWrapper.cpp | |
| parent | 7ca430df713ad1697a9d27eb4ae0f49c8563eed4 (diff) | |
| parent | 9dc7abe06d2b2771b09b6dac6eef5ac83b58573f (diff) | |
| download | rust-02004ef78383cb174a41df7735a552823fa10b90.tar.gz rust-02004ef78383cb174a41df7735a552823fa10b90.zip | |
Auto merge of #45452 - estebank:colon-typo, r=nikomatsakis
Detect `=` -> `:` typo in let bindings
When encountering a let binding type error, attempt to parse as
initializer instead. If successful, it is likely just a typo:
```rust
fn main() {
let x: Vec::with_capacity(10);
}
```
```
error: expected type, found `10`
--> file.rs:3:31
|
3 | let x: Vec::with_capacity(10, 20);
| -- ^^
| ||
| |help: did you mean assign here?: `=`
| while parsing the type for `x`
```
Fix #43703.
Diffstat (limited to 'src/rustllvm/ArchiveWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
