Disallow arm bodies on never patterns
This commit is contained in:
parent
06a8ed10b6
commit
70deb9a57f
8 changed files with 75 additions and 26 deletions
|
@ -349,6 +349,15 @@ pub struct MatchArmWithNoBody {
|
|||
pub suggestion: Span,
|
||||
}
|
||||
|
||||
#[derive(Diagnostic)]
|
||||
#[diag(ast_lowering_never_pattern_with_body)]
|
||||
pub struct NeverPatternWithBody {
|
||||
#[primary_span]
|
||||
#[label]
|
||||
#[suggestion(code = "", applicability = "maybe-incorrect")]
|
||||
pub span: Span,
|
||||
}
|
||||
|
||||
#[derive(Diagnostic)]
|
||||
#[diag(ast_lowering_never_pattern_with_guard)]
|
||||
pub struct NeverPatternWithGuard {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue