mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-29 19:47:38 +00:00
![]() 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` |
||
---|---|---|
.. | ||
bad-macro-argument.rs | ||
bad-macro-argument.stderr | ||
issue-33569.rs | ||
issue-33569.stderr | ||
issue-37113.rs | ||
issue-37113.stderr | ||
issue-37234.rs | ||
issue-37234.stderr | ||
literals-are-validated-before-expansion.rs | ||
literals-are-validated-before-expansion.stderr | ||
macro-doc-comments-1.rs | ||
macro-doc-comments-1.stderr | ||
macro-doc-comments-2.rs | ||
macro-doc-comments-2.stderr | ||
macro-expand-to-field.rs | ||
macro-expand-to-field.stderr | ||
macro-expand-to-match-arm.rs | ||
macro-expand-to-match-arm.stderr | ||
macro-incomplete-parse.rs | ||
macro-incomplete-parse.stderr | ||
macro-repeat.rs | ||
macro-repeat.stderr | ||
mbe-bare-trait-object-maybe-trait-bound.rs | ||
mbe-dotdotdot-may-not-begin-a-type.rs | ||
pub-item-macro.rs | ||
pub-item-macro.stderr | ||
statement-boundaries.rs | ||
trait-non-item-macros.rs | ||
trait-non-item-macros.stderr | ||
trait-object-macro-matcher.rs | ||
trait-object-macro-matcher.stderr |