Skip to content

Commit 535793d

Browse files
author
Roman Borschel
committed
Use exhaustive let-match in Spanned impls.
1 parent 647c84b commit 535793d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/ast/spans.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -741,8 +741,10 @@ impl Spanned for CaseStatement {
741741
fn span(&self) -> Span {
742742
let CaseStatement {
743743
case_token: AttachedToken(start),
744+
match_expr: _,
745+
when_blocks: _,
746+
else_block: _,
744747
end_case_token: AttachedToken(end),
745-
..
746748
} = self;
747749

748750
union_spans([start.span, end.span].into_iter())
@@ -775,8 +777,8 @@ impl Spanned for ConditionalStatements {
775777
}
776778
ConditionalStatements::BeginEnd {
777779
begin_token: AttachedToken(start),
780+
statements: _,
778781
end_token: AttachedToken(end),
779-
..
780782
} => union_spans([start.span, end.span].into_iter()),
781783
}
782784
}

0 commit comments

Comments
 (0)