about summary refs log tree commit diff
path: root/src/rustllvm/ArchiveWrapper.cpp
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2017-11-08 20:00:41 +0000
committerbors <bors@rust-lang.org>2017-11-08 20:00:41 +0000
commit02004ef78383cb174a41df7735a552823fa10b90 (patch)
tree13ac8f02bd76e0479917b424dbe0d33a15dd611b /src/rustllvm/ArchiveWrapper.cpp
parent7ca430df713ad1697a9d27eb4ae0f49c8563eed4 (diff)
parent9dc7abe06d2b2771b09b6dac6eef5ac83b58573f (diff)
downloadrust-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