rust/tests/ui/parser/removed-syntax
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
..
removed-syntax-box.fixed
removed-syntax-box.rs
removed-syntax-box.stderr
removed-syntax-closure-lifetime.rs
removed-syntax-closure-lifetime.stderr
removed-syntax-enum-newtype.rs
removed-syntax-enum-newtype.stderr
removed-syntax-field-let-2.rs
removed-syntax-field-let-2.stderr
removed-syntax-field-let.rs
removed-syntax-field-let.stderr
removed-syntax-field-semicolon.rs
removed-syntax-field-semicolon.stderr
removed-syntax-fixed-vec.rs
removed-syntax-fixed-vec.stderr
removed-syntax-fn-sigil.rs
removed-syntax-fn-sigil.stderr Detect more cases of `=` to `:` typo 2024-03-01 02:03:00 +00:00
removed-syntax-mode.rs
removed-syntax-mode.stderr
removed-syntax-mut-vec-expr.rs
removed-syntax-mut-vec-expr.stderr
removed-syntax-mut-vec-ty.rs
removed-syntax-mut-vec-ty.stderr
removed-syntax-ptr-lifetime.rs
removed-syntax-ptr-lifetime.stderr
removed-syntax-record.rs
removed-syntax-record.stderr
removed-syntax-static-fn.rs
removed-syntax-static-fn.stderr
removed-syntax-uniq-mut-expr.rs
removed-syntax-uniq-mut-expr.stderr
removed-syntax-uniq-mut-ty.rs
removed-syntax-uniq-mut-ty.stderr
removed-syntax-with-1.rs
removed-syntax-with-1.stderr
removed-syntax-with-2.rs
removed-syntax-with-2.stderr