1
Fork 0

Correctly gate the parsing of match arms without body

This commit is contained in:
Nadrieril 2023-12-12 13:33:39 +01:00
parent 21cce21d8c
commit e274372689
9 changed files with 227 additions and 26 deletions

View file

@ -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,
}