• E
    Detect `=` -> `:` typo in let bindings · 9dc7abe0
    Esteban Küber 提交于
    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`
    ```
    9dc7abe0
type-ascription-instead-of-initializer.stderr 582 字节