review comments 2 electric boogalo
This commit is contained in:
parent
9ed348376f
commit
45a09a4683
@ -1440,12 +1440,12 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
|
||||
if !ty.is_ty_var() {
|
||||
ty
|
||||
} else {
|
||||
if let None = self.tainted_by_errors() {
|
||||
let e = self.tainted_by_errors().unwrap_or_else(|| {
|
||||
self.err_ctxt()
|
||||
.emit_inference_failure_err((**self).body_id, sp, ty.into(), E0282, true)
|
||||
.emit();
|
||||
}
|
||||
let err = self.tcx.ty_error();
|
||||
.emit()
|
||||
});
|
||||
let err = self.tcx.ty_error_with_guaranteed(e);
|
||||
self.demand_suptype(sp, err, ty);
|
||||
err
|
||||
}
|
||||
|
@ -73,7 +73,6 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
|
||||
let ty = self.typeck_results.borrow().expr_ty_adjusted(expr);
|
||||
let ty = self.resolve_vars_if_possible(ty);
|
||||
if ty.has_non_region_infer() {
|
||||
assert!(self.tainted_by_errors().is_some());
|
||||
self.tcx.ty_error()
|
||||
} else {
|
||||
self.tcx.erase_regions(ty)
|
||||
|
Loading…
x
Reference in New Issue
Block a user