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