@@ -62,7 +62,7 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> {
6262 let value = self . resolve_type_vars_if_possible ( & value) ;
6363
6464 // 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
6666 // the snapshot. Once we exit `probe()`, those are
6767 // going to be popped, so we will have to
6868 // eliminate any references to them.
@@ -106,10 +106,10 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> {
106106 fudger. int_vars . is_empty ( ) &&
107107 fudger. float_vars . is_empty ( ) &&
108108 fudger. region_vars . is_empty ( ) {
109- return Ok ( value) ;
109+ Ok ( value)
110+ } else {
111+ Ok ( value. fold_with ( & mut fudger) )
110112 }
111-
112- Ok ( value. fold_with ( & mut fudger) )
113113 }
114114}
115115
@@ -137,7 +137,7 @@ impl<'a, 'gcx, 'tcx> TypeFolder<'gcx, 'tcx> for InferenceFudger<'a, 'gcx, 'tcx>
137137 self . infcx . next_ty_var ( origin)
138138 } else {
139139 // This variable was created before the
140- // "fudging". Since we refresh all type
140+ // "fudging". Since we refresh all type
141141 // variables to their binding anyhow, we know
142142 // that it is unbound, so we can just return
143143 // it.
0 commit comments