@@ -1362,6 +1362,14 @@ impl<'l, 'tcx: 'l, 'll, O: DumpOutput + 'll> DumpVisitor<'l, 'tcx, 'll, O> {
1362
1362
}
1363
1363
}
1364
1364
}
1365
+
1366
+ fn process_bounds ( & mut self , bounds : & ' l ast:: GenericBounds ) {
1367
+ for bound in bounds {
1368
+ if let ast:: GenericBound :: Trait ( ref trait_ref, _) = * bound {
1369
+ self . process_path ( trait_ref. trait_ref . ref_id , & trait_ref. trait_ref . path )
1370
+ }
1371
+ }
1372
+ }
1365
1373
}
1366
1374
1367
1375
impl < ' l , ' tcx : ' l , ' ll , O : DumpOutput + ' ll > Visitor < ' l > for DumpVisitor < ' l , ' tcx , ' ll , O > {
@@ -1527,20 +1535,19 @@ impl<'l, 'tcx: 'l, 'll, O: DumpOutput + 'll> Visitor<'l> for DumpVisitor<'l, 'tc
1527
1535
1528
1536
fn visit_generics ( & mut self , generics : & ' l ast:: Generics ) {
1529
1537
for param in & generics. params {
1530
- match param. kind {
1531
- ast:: GenericParamKind :: Lifetime { .. } => { }
1532
- ast:: GenericParamKind :: Type { ref default, .. } => {
1533
- for bound in & param. bounds {
1534
- if let ast:: GenericBound :: Trait ( ref trait_ref, _) = * bound {
1535
- self . process_path ( trait_ref. trait_ref . ref_id , & trait_ref. trait_ref . path )
1536
- }
1537
- }
1538
- if let Some ( ref ty) = default {
1539
- self . visit_ty ( & ty) ;
1540
- }
1538
+ if let ast:: GenericParamKind :: Type { ref default, .. } = param. kind {
1539
+ self . process_bounds ( & param. bounds ) ;
1540
+ if let Some ( ref ty) = default {
1541
+ self . visit_ty ( & ty) ;
1541
1542
}
1542
1543
}
1543
1544
}
1545
+ for pred in & generics. where_clause . predicates {
1546
+ if let ast:: WherePredicate :: BoundPredicate ( ref wbp) = * pred {
1547
+ self . process_bounds ( & wbp. bounds ) ;
1548
+ self . visit_ty ( & wbp. bounded_ty ) ;
1549
+ }
1550
+ }
1544
1551
}
1545
1552
1546
1553
fn visit_ty ( & mut self , t : & ' l ast:: Ty ) {
0 commit comments