rust/compiler/rustc_parse/src
Jacob Pratt da493c91d6
Rollup merge of #137435 - estebank:match-arm-2, r=compiler-errors
Fix "missing match arm body" suggestion involving `!`

Include the match arm guard in the gated span, so that the suggestion to add a body is correct instead of inserting the body before the guard.

Make the suggestion verbose.

```
error: `match` arm with no body
  --> $DIR/feature-gate-never_patterns.rs:43:9
   |
LL |         Some(_) if false,
   |         ^^^^^^^^^^^^^^^^
   |
help: add a body after the pattern
   |
LL |         Some(_) if false => { todo!() },
   |                          ++++++++++++++
```

r? `@compiler-errors`
2025-02-23 02:44:19 -05:00
..
lexer replaces few consts with statics to reduce readonly section 2025-01-28 17:38:22 +03:00
parser Rollup merge of #137435 - estebank:match-arm-2, r=compiler-errors 2025-02-23 02:44:19 -05:00
errors.rs Try to recover from path sep error in parser 2025-02-15 07:44:20 +08:00
lib.rs tree-wide: parallel: Fully removed all Lrc, replaced with Arc 2025-02-03 13:25:57 +03:00
validate_attr.rs Properly record metavar spans for other expansions other than TT 2024-12-21 20:37:27 +00:00