@@ -32,7 +32,6 @@ impl<'a, 'tcx> InteriorVisitor<'a, 'tcx> {
32
32
debug ! ( "generator_interior: attempting to record type {:?} {:?} {:?} {:?}" ,
33
33
ty, scope, expr, source_span) ;
34
34
35
-
36
35
let live_across_yield = scope. map ( |s| {
37
36
self . region_scope_tree . yield_in_scope ( s) . and_then ( |yield_data| {
38
37
// If we are recording an expression that is the last yield
@@ -54,15 +53,11 @@ impl<'a, 'tcx> InteriorVisitor<'a, 'tcx> {
54
53
} ) . unwrap_or_else ( || Some ( YieldData {
55
54
span : DUMMY_SP ,
56
55
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 ( ) ,
61
57
} ) ) ;
62
58
63
59
if let Some ( yield_data) = live_across_yield {
64
60
let ty = self . fcx . resolve_vars_if_possible ( & ty) ;
65
-
66
61
debug ! ( "type in expr = {:?}, scope = {:?}, type = {:?}, count = {}, yield_span = {:?}" ,
67
62
expr, scope, ty, self . expr_count, yield_data. span) ;
68
63
@@ -94,6 +89,11 @@ impl<'a, 'tcx> InteriorVisitor<'a, 'tcx> {
94
89
} else {
95
90
debug ! ( "no type in expr = {:?}, count = {:?}, span = {:?}" ,
96
91
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
+ }
97
97
}
98
98
}
99
99
}
0 commit comments