Skip to content

Commit 3fccbac

Browse files
committed
or-patterns: adjust librustc_lint.
1 parent 76625eb commit 3fccbac

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/librustc_lint/builtin.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -772,7 +772,7 @@ impl EarlyLintPass for UnusedDocComment {
772772
}
773773

774774
fn check_arm(&mut self, cx: &EarlyContext<'_>, arm: &ast::Arm) {
775-
let arm_span = arm.pats[0].span.with_hi(arm.body.span.hi());
775+
let arm_span = arm.pat.span.with_hi(arm.body.span.hi());
776776
self.warn_if_doc(cx, arm_span, "match arms", false, &arm.attrs);
777777
}
778778

0 commit comments

Comments
 (0)