Correctly gate the parsing of match arms without body
This commit is contained in:
parent
21cce21d8c
commit
e274372689
9 changed files with 227 additions and 26 deletions
|
@ -758,3 +758,12 @@ pub struct AnonStructOrUnionNotAllowed {
|
|||
pub span: Span,
|
||||
pub struct_or_union: &'static str,
|
||||
}
|
||||
|
||||
#[derive(Diagnostic)]
|
||||
#[diag(ast_passes_match_arm_with_no_body)]
|
||||
pub struct MatchArmWithNoBody {
|
||||
#[primary_span]
|
||||
pub span: Span,
|
||||
#[suggestion(code = " => todo!(),", applicability = "has-placeholders")]
|
||||
pub suggestion: Span,
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue