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