Skip to content

Commit ed50cb1

Browse files
committed
dogfood
1 parent 6a6dfa5 commit ed50cb1

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

clippy_lints/src/utils/inspector.rs

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#![allow(print_stdout, use_debug)]
2+
13
//! checks for attributes
24
35
use rustc::lint::*;
@@ -29,7 +31,6 @@ impl LintPass for Pass {
2931
}
3032
}
3133

32-
#[allow(print_stdout, use_debug)]
3334
impl LateLintPass for Pass {
3435
fn check_item(&mut self, cx: &LateContext, item: &hir::Item) {
3536
if !has_attr(&item.attrs) {
@@ -416,14 +417,14 @@ fn print_pat(cx: &LateContext, pat: &hir::Pat, indent: usize) {
416417
print_pat(cx, &field.node.pat, indent + 1);
417418
}
418419
},
419-
hir::PatKind::TupleStruct(ref path, ref pats, opt_dots_position) => {
420+
hir::PatKind::TupleStruct(ref path, ref fields, opt_dots_position) => {
420421
println!("{}TupleStruct", ind);
421422
println!("{}path: {}", ind, path);
422423
if let Some(dot_position) = opt_dots_position {
423424
println!("{}dot position: {}", ind, dot_position);
424425
}
425-
for field in pats {
426-
print_pat(cx, &field, indent + 1);
426+
for field in fields {
427+
print_pat(cx, field, indent + 1);
427428
}
428429
},
429430
hir::PatKind::Path(ref sel, ref path) => {
@@ -437,7 +438,7 @@ fn print_pat(cx: &LateContext, pat: &hir::Pat, indent: usize) {
437438
println!("{}dot position: {}", ind, dot_position);
438439
}
439440
for field in pats {
440-
print_pat(cx, &field, indent + 1);
441+
print_pat(cx, field, indent + 1);
441442
}
442443
},
443444
hir::PatKind::Box(ref inner) => {
@@ -458,18 +459,18 @@ fn print_pat(cx: &LateContext, pat: &hir::Pat, indent: usize) {
458459
print_expr(cx, l, indent + 1);
459460
print_expr(cx, r, indent + 1);
460461
},
461-
hir::PatKind::Slice(ref start, ref range, ref end) => {
462+
hir::PatKind::Slice(ref first_pats, ref range, ref last_pats) => {
462463
println!("{}Slice [a, b, ..i, y, z]", ind);
463464
println!("[a, b]:");
464-
for pat in start {
465+
for pat in first_pats {
465466
print_pat(cx, pat, indent + 1);
466467
}
467468
println!("i:");
468469
if let Some(ref pat) = *range {
469470
print_pat(cx, pat, indent + 1);
470471
}
471472
println!("[y, z]:");
472-
for pat in end {
473+
for pat in last_pats {
473474
print_pat(cx, pat, indent + 1);
474475
}
475476
},

0 commit comments

Comments
 (0)