Rustup to rustc 1.12.0-nightly (1225e122f 2016-07-30)

This commit is contained in:
mcarton 2016-07-31 19:22:07 +02:00
parent 04c8108e3f
commit 30ec2c4d92
No known key found for this signature in database
GPG key ID: 5E427C794CBA45E8

View file

@ -47,13 +47,13 @@ impl LintPass for UnusedLabel {
}
impl LateLintPass for UnusedLabel {
fn check_fn(&mut self, cx: &LateContext, kind: FnKind, decl: &hir::FnDecl, body: &hir::Block, span: Span, _: ast::NodeId) {
fn check_fn(&mut self, cx: &LateContext, kind: FnKind, decl: &hir::FnDecl, body: &hir::Block, span: Span, fn_id: ast::NodeId) {
if in_macro(cx, span) {
return;
}
let mut v = UnusedLabelVisitor::new();
walk_fn(&mut v, kind, decl, body, span);
walk_fn(&mut v, kind, decl, body, span, fn_id);
for (label, span) in v.labels {
span_lint(cx, UNUSED_LABEL, span, &format!("unused label `{}`", label));