rust/compiler/rustc_parse/src
Dylan DPC a9a5529eac
Rollup merge of #102927 - compiler-errors:let, r=davidtwco
Fix `let` keyword removal suggestion in structs

(1.) Fixes a bug where, given this code:
```rust
struct Foo {
  let x: i32,
}
```

We were parsing the field name as `let` instead of `x`, which causes issues later on in the type-checking phase.

(2.) Also, suggestions for `let: i32` as a field regressed, displaying this extra `help:` which is removed by this PR

```
help: remove the let, the `let` keyword is not allowed in struct field definitions
  |
2 -     let: i32,
2 +     : i32,
```

(3.) Makes the suggestion text a bit more succinct, since we don't need to re-explain that `let` is not allowed in this position (since it's in a note that follows). This causes the suggestion to render inline as well.

cc `@gimbles,` this addresses a few nits I mentioned in your PR.
2022-10-12 22:13:26 +05:30
..
lexer Invert is_top_level to avoid negation. 2022-10-03 11:42:29 +11:00
parser Rollup merge of #102927 - compiler-errors:let, r=davidtwco 2022-10-12 22:13:26 +05:30
errors.rs Implement IntoDiagnosticArg for rustc_ast::token::Token(Kind) 2022-09-27 20:29:19 +02:00
lib.rs Fix compiler docs 2022-10-10 18:28:29 +02:00
validate_attr.rs Overhaul MacArgs::Eq. 2022-05-05 07:06:12 +10:00