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`
This commit is contained in:
Jacob Pratt 2025-02-23 02:44:19 -05:00 committed by GitHub
commit 21c185e2b0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

Diff content is not available