Gracefully handle missing ternary operator
This commit is contained in:
parent
cb6ab9516b
commit
16481807f5
7 changed files with 220 additions and 4 deletions
|
@ -365,6 +365,14 @@ pub(crate) enum IfExpressionMissingThenBlockSub {
|
|||
AddThenBlock(#[primary_span] Span),
|
||||
}
|
||||
|
||||
#[derive(Diagnostic)]
|
||||
#[diag(parse_ternary_operator)]
|
||||
#[help]
|
||||
pub struct TernaryOperator {
|
||||
#[primary_span]
|
||||
pub span: Span,
|
||||
}
|
||||
|
||||
#[derive(Subdiagnostic)]
|
||||
#[suggestion(parse_extra_if_in_let_else, applicability = "maybe-incorrect", code = "")]
|
||||
pub(crate) struct IfExpressionLetSomeSub {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue