@@ -62,7 +62,7 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> {
62
62
let value = self . resolve_type_vars_if_possible ( & value) ;
63
63
64
64
// At this point, `value` could in principle refer
65
- // to types/regions that have been created during
65
+ // to inference variables that have been created during
66
66
// the snapshot. Once we exit `probe()`, those are
67
67
// going to be popped, so we will have to
68
68
// eliminate any references to them.
@@ -106,10 +106,10 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> {
106
106
fudger. int_vars . is_empty ( ) &&
107
107
fudger. float_vars . is_empty ( ) &&
108
108
fudger. region_vars . is_empty ( ) {
109
- return Ok ( value) ;
109
+ Ok ( value)
110
+ } else {
111
+ Ok ( value. fold_with ( & mut fudger) )
110
112
}
111
-
112
- Ok ( value. fold_with ( & mut fudger) )
113
113
}
114
114
}
115
115
@@ -137,7 +137,7 @@ impl<'a, 'gcx, 'tcx> TypeFolder<'gcx, 'tcx> for InferenceFudger<'a, 'gcx, 'tcx>
137
137
self . infcx . next_ty_var ( origin)
138
138
} else {
139
139
// This variable was created before the
140
- // "fudging". Since we refresh all type
140
+ // "fudging". Since we refresh all type
141
141
// variables to their binding anyhow, we know
142
142
// that it is unbound, so we can just return
143
143
// it.
0 commit comments