@@ -31,7 +31,6 @@ impl<'a, 'tcx> InteriorVisitor<'a, 'tcx> {
3131 debug ! ( "generator_interior: attempting to record type {:?} {:?} {:?} {:?}" ,
3232 ty, scope, expr, source_span) ;
3333
34-
3534 let live_across_yield = scope. map ( |s| {
3635 self . region_scope_tree . yield_in_scope ( s) . and_then ( |yield_data| {
3736 // If we are recording an expression that is the last yield
@@ -53,15 +52,11 @@ impl<'a, 'tcx> InteriorVisitor<'a, 'tcx> {
5352 } ) . unwrap_or_else ( || Some ( YieldData {
5453 span : DUMMY_SP ,
5554 expr_and_pat_count : 0 ,
56- source : match self . kind { // Guess based on the kind of the current generator.
57- hir:: GeneratorKind :: Gen => hir:: YieldSource :: Yield ,
58- hir:: GeneratorKind :: Async ( _) => hir:: YieldSource :: Await ,
59- } ,
55+ source : self . kind . into ( ) ,
6056 } ) ) ;
6157
6258 if let Some ( yield_data) = live_across_yield {
6359 let ty = self . fcx . resolve_vars_if_possible ( & ty) ;
64-
6560 debug ! ( "type in expr = {:?}, scope = {:?}, type = {:?}, count = {}, yield_span = {:?}" ,
6661 expr, scope, ty, self . expr_count, yield_data. span) ;
6762
@@ -93,6 +88,11 @@ impl<'a, 'tcx> InteriorVisitor<'a, 'tcx> {
9388 } else {
9489 debug ! ( "no type in expr = {:?}, count = {:?}, span = {:?}" ,
9590 expr, self . expr_count, expr. map( |e| e. span) ) ;
91+ let ty = self . fcx . resolve_vars_if_possible ( & ty) ;
92+ if let Some ( ( unresolved_type, unresolved_type_span) ) = self . fcx . unresolved_type_vars ( & ty) {
93+ debug ! ( "remained unresolved_type = {:?}, unresolved_type_span: {:?}" ,
94+ unresolved_type, unresolved_type_span) ;
95+ }
9696 }
9797 }
9898}
0 commit comments