Move ty::Error branch into super_combine_tys
This commit is contained in:
parent
df1b5d3cc2
commit
09da2ebd63
10 changed files with 12 additions and 81 deletions
|
@ -43,6 +43,11 @@ impl<'tcx> InferCtxt<'tcx> {
|
|||
debug_assert!(!b.has_escaping_bound_vars());
|
||||
|
||||
match (a.kind(), b.kind()) {
|
||||
(&ty::Error(e), _) | (_, &ty::Error(e)) => {
|
||||
self.set_tainted_by_errors(e);
|
||||
return Ok(Ty::new_error(self.tcx, e));
|
||||
}
|
||||
|
||||
// Relate integral variables to other types
|
||||
(&ty::Infer(ty::IntVar(a_id)), &ty::Infer(ty::IntVar(b_id))) => {
|
||||
self.inner.borrow_mut().int_unification_table().union(a_id, b_id);
|
||||
|
|
|
@ -183,11 +183,6 @@ impl<'tcx> TypeRelation<TyCtxt<'tcx>> for TypeRelating<'_, 'tcx> {
|
|||
)?;
|
||||
}
|
||||
|
||||
(&ty::Error(e), _) | (_, &ty::Error(e)) => {
|
||||
infcx.set_tainted_by_errors(e);
|
||||
return Ok(Ty::new_error(self.cx(), e));
|
||||
}
|
||||
|
||||
(
|
||||
&ty::Alias(ty::Opaque, ty::AliasTy { def_id: a_def_id, .. }),
|
||||
&ty::Alias(ty::Opaque, ty::AliasTy { def_id: b_def_id, .. }),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue