@@ -267,14 +267,17 @@ impl<'a, 'gcx, 'tcx> Visitor<'gcx> for FindNestedTypeVisitor<'a, 'gcx, 'tcx> {
267
267
}
268
268
269
269
hir:: TyBareFn ( ref fndecl) => {
270
- fndecl. lifetimes . iter ( ) . filter_map ( |lf| {
270
+ fndecl. lifetimes . iter ( ) . map ( |lf| {
271
+ debug ! ( "arg we are handling is...{:?}" , arg) ;
271
272
match self . infcx . tcx . named_region_map . defs . get ( & lf. lifetime . id ) {
272
-
273
273
Some ( & rl:: Region :: LateBoundAnon ( debuijn_index, anon_index) ) => {
274
+ debug ! ( "debuijn_index.depth ={:?} self.depth = {:?} anon_index ={:?} br_index={:?}" ,
275
+ debuijn_index. depth, self . depth, anon_index, br_index) ;
274
276
if debuijn_index. depth == self . depth && anon_index == br_index {
277
+ debug ! ( "arg is {:?}" , Some ( arg) ) ;
275
278
self . found_type = Some ( arg) ;
276
279
return ; // we can stop visiting now
277
- } else { }
280
+ }
278
281
}
279
282
Some ( & rl:: Region :: Static ) |
280
283
Some ( & rl:: Region :: EarlyBound ( _, _) ) |
@@ -292,6 +295,7 @@ impl<'a, 'gcx, 'tcx> Visitor<'gcx> for FindNestedTypeVisitor<'a, 'gcx, 'tcx> {
292
295
// walk the embedded contents: e.g., if we are visiting `Vec<&Foo>`,
293
296
// go on to visit `&Foo`
294
297
self . depth += 1 ;
298
+ debug ! ( "depth is {:?}" , self . depth) ;
295
299
intravisit:: walk_ty ( self , arg) ;
296
300
self . depth += 1 ;
297
301
}
0 commit comments