Rustup to rustc 1.12.0-nightly (1225e122f 2016-07-30)
This commit is contained in:
parent
04c8108e3f
commit
30ec2c4d92
1 changed files with 2 additions and 2 deletions
|
|
@ -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));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue