Disallow guards on never patterns
This commit is contained in:
parent
a2dcb3a6d9
commit
06a8ed10b6
7 changed files with 47 additions and 43 deletions
|
@ -349,6 +349,14 @@ pub struct MatchArmWithNoBody {
|
|||
pub suggestion: Span,
|
||||
}
|
||||
|
||||
#[derive(Diagnostic)]
|
||||
#[diag(ast_lowering_never_pattern_with_guard)]
|
||||
pub struct NeverPatternWithGuard {
|
||||
#[primary_span]
|
||||
#[suggestion(code = "", applicability = "maybe-incorrect")]
|
||||
pub span: Span,
|
||||
}
|
||||
|
||||
#[derive(Diagnostic, Clone, Copy)]
|
||||
#[diag(ast_lowering_arbitrary_expression_in_pattern)]
|
||||
pub struct ArbitraryExpressionInPattern {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue