@@ -488,6 +488,11 @@ fn check_struct(ccx: @crate_ctxt, struct_def: @ast::struct_def,
488
488
}
489
489
490
490
fn check_item ( ccx : @crate_ctxt , it : @ast:: item ) {
491
+ debug ! ( "check_item(it.id=%d, it.ident=%s)" ,
492
+ it. id,
493
+ ty:: item_path_str( ccx. tcx, local_def( it. id) ) ) ;
494
+ let _indenter = indenter ( ) ;
495
+
491
496
match it. node {
492
497
ast:: item_const( _, e) => check_const ( ccx, it. span , e, it. id ) ,
493
498
ast:: item_enum( enum_definition, _) => {
@@ -2525,6 +2530,9 @@ fn check_bounds_are_used(ccx: @crate_ctxt,
2525
2530
span: span,
2526
2531
tps: ~[ast::ty_param],
2527
2532
ty: ty::t) {
2533
+ debug!(" check_bounds_are_used( n_tps=%u, ty=%s) ",
2534
+ tps.len(), ty_to_str(ccx.tcx, ty));
2535
+
2528
2536
// make a vector of booleans initially false, set to true when used
2529
2537
if tps.len() == 0u { return; }
2530
2538
let tps_used = vec::to_mut(vec::from_elem(tps.len(), false));
@@ -2534,7 +2542,10 @@ fn check_bounds_are_used(ccx: @crate_ctxt,
2534
2542
|_r| {},
2535
2543
|t| {
2536
2544
match ty::get(t).sty {
2537
- ty::ty_param({idx, _}) => { tps_used[idx] = true; }
2545
+ ty::ty_param({idx, _}) => {
2546
+ debug!(" Found use of ty param #%u", idx);
2547
+ tps_used[idx] = true;
2548
+ }
2538
2549
_ => ()
2539
2550
}
2540
2551
true
0 commit comments