1
Fork 0

stop categorizing inference variables as diverging when created

Instead, we now rely on the code that looks for a NeverToAny adjustment.
This commit is contained in:
Niko Matsakis 2020-11-23 09:06:37 -05:00 committed by Mark Rousskov
parent 1c004f2d43
commit bc2ece2a8d
5 changed files with 17 additions and 63 deletions

View file

@ -77,7 +77,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
!self.typeck_results.borrow().adjustments().contains_key(expr.hir_id),
"expression with never type wound up being adjusted"
);
let adj_ty = self.next_diverging_ty_var(TypeVariableOrigin {
let adj_ty = self.next_ty_var(TypeVariableOrigin {
kind: TypeVariableOriginKind::AdjustmentType,
span: expr.span,
});