Fix make tidy

This commit is contained in:
Andrew Cann 2017-02-05 22:29:06 +08:00
parent 0dbb1e4fee
commit 7135d0ab94

View File

@ -310,7 +310,8 @@ fn check_arms<'a, 'tcx>(cx: &mut MatchCheckCtxt<'a, 'tcx>,
let mut diagnostic = Diagnostic::new(Level::Warning,
"unreachable pattern");
diagnostic.set_span(pat.span);
cx.tcx.sess.add_lint_diagnostic(lint::builtin::UNREACHABLE_PATTERNS,
cx.tcx.sess.add_lint_diagnostic(
lint::builtin::UNREACHABLE_PATTERNS,
hir_pat.id, diagnostic);
},
// The arm with the wildcard pattern.