1
+ #![ allow( print_stdout, use_debug) ]
2
+
1
3
//! checks for attributes
2
4
3
5
use rustc:: lint:: * ;
@@ -29,7 +31,6 @@ impl LintPass for Pass {
29
31
}
30
32
}
31
33
32
- #[ allow( print_stdout, use_debug) ]
33
34
impl LateLintPass for Pass {
34
35
fn check_item ( & mut self , cx : & LateContext , item : & hir:: Item ) {
35
36
if !has_attr ( & item. attrs ) {
@@ -416,14 +417,14 @@ fn print_pat(cx: &LateContext, pat: &hir::Pat, indent: usize) {
416
417
print_pat ( cx, & field. node . pat , indent + 1 ) ;
417
418
}
418
419
} ,
419
- hir:: PatKind :: TupleStruct ( ref path, ref pats , opt_dots_position) => {
420
+ hir:: PatKind :: TupleStruct ( ref path, ref fields , opt_dots_position) => {
420
421
println ! ( "{}TupleStruct" , ind) ;
421
422
println ! ( "{}path: {}" , ind, path) ;
422
423
if let Some ( dot_position) = opt_dots_position {
423
424
println ! ( "{}dot position: {}" , ind, dot_position) ;
424
425
}
425
- for field in pats {
426
- print_pat ( cx, & field, indent + 1 ) ;
426
+ for field in fields {
427
+ print_pat ( cx, field, indent + 1 ) ;
427
428
}
428
429
} ,
429
430
hir:: PatKind :: Path ( ref sel, ref path) => {
@@ -437,7 +438,7 @@ fn print_pat(cx: &LateContext, pat: &hir::Pat, indent: usize) {
437
438
println ! ( "{}dot position: {}" , ind, dot_position) ;
438
439
}
439
440
for field in pats {
440
- print_pat ( cx, & field, indent + 1 ) ;
441
+ print_pat ( cx, field, indent + 1 ) ;
441
442
}
442
443
} ,
443
444
hir:: PatKind :: Box ( ref inner) => {
@@ -458,18 +459,18 @@ fn print_pat(cx: &LateContext, pat: &hir::Pat, indent: usize) {
458
459
print_expr ( cx, l, indent + 1 ) ;
459
460
print_expr ( cx, r, indent + 1 ) ;
460
461
} ,
461
- hir:: PatKind :: Slice ( ref start , ref range, ref end ) => {
462
+ hir:: PatKind :: Slice ( ref first_pats , ref range, ref last_pats ) => {
462
463
println ! ( "{}Slice [a, b, ..i, y, z]" , ind) ;
463
464
println ! ( "[a, b]:" ) ;
464
- for pat in start {
465
+ for pat in first_pats {
465
466
print_pat ( cx, pat, indent + 1 ) ;
466
467
}
467
468
println ! ( "i:" ) ;
468
469
if let Some ( ref pat) = * range {
469
470
print_pat ( cx, pat, indent + 1 ) ;
470
471
}
471
472
println ! ( "[y, z]:" ) ;
472
- for pat in end {
473
+ for pat in last_pats {
473
474
print_pat ( cx, pat, indent + 1 ) ;
474
475
}
475
476
} ,
0 commit comments