9dc7abe06d
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` ```
18 lines
430 B
Plaintext
18 lines
430 B
Plaintext
error: expected identifier, found keyword `true`
|
|
--> $DIR/issue-44406.rs:18:10
|
|
|
|
|
18 | foo!(true);
|
|
| ^^^^
|
|
|
|
error: expected type, found keyword `true`
|
|
--> $DIR/issue-44406.rs:18:10
|
|
|
|
|
13 | bar(baz: $rest)
|
|
| - help: did you mean to use `;` here?
|
|
...
|
|
18 | foo!(true);
|
|
| ^^^^ expecting a type here because of type ascription
|
|
|
|
error: aborting due to 2 previous errors
|
|
|