rust/tests/ui/parser/nested-missing-closing-angle-bracket.stderr
Esteban Küber bde2dfb127 Detect more cases of = to : typo
When a `Local` is fully parsed, but not followed by a `;`, keep the `:` span
arround and mention it. If the type could continue being parsed as an
expression, suggest replacing the `:` with a `=`.

```
error: expected one of `!`, `+`, `->`, `::`, `;`, or `=`, found `.`
 --> file.rs:2:32
  |
2 |     let _: std::env::temp_dir().join("foo");
  |          -                     ^ expected one of `!`, `+`, `->`, `::`, `;`, or `=`
  |          |
  |          while parsing the type for `_`
  |          help: use `=` if you meant to assign
```

Fix #119665.
2024-03-01 02:03:00 +00:00

9 lines
279 B
Plaintext

error: expected one of `,` or `>`, found `;`
--> $DIR/nested-missing-closing-angle-bracket.rs:2:46
|
LL | let v : Vec::<Vec<(u32,_,_)> = vec![vec![]];
| - while parsing the type for `v` ^ expected one of `,` or `>`
error: aborting due to 1 previous error