Skip to content

Commit 44d9929

Browse files
nikomatsakissgrif
authored andcommitted
remove unnecessary clause propagating divergence
This should not be needed: the new variable will be related to the old ones, so if they are constrained, so is the new variable; if they are not, and hence default to diverging, so will the new variable.
1 parent 69fe43c commit 44d9929

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

src/librustc/infer/lattice.rs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -70,14 +70,6 @@ pub fn super_lattice_tys<'a, 'gcx, 'tcx, L>(this: &mut L,
7070
let a = infcx.type_variables.borrow_mut().replace_if_possible(a);
7171
let b = infcx.type_variables.borrow_mut().replace_if_possible(b);
7272
match (&a.sty, &b.sty) {
73-
(&ty::TyInfer(TyVar(..)), &ty::TyInfer(TyVar(..)))
74-
if infcx.type_var_diverges(a) && infcx.type_var_diverges(b) => {
75-
let v = infcx.next_diverging_ty_var(
76-
TypeVariableOrigin::LatticeVariable(this.cause().span));
77-
this.relate_bound(v, a, b)?;
78-
Ok(v)
79-
}
80-
8173
// If one side is known to be a variable and one is not,
8274
// create a variable (`v`) to represent the LUB. Make sure to
8375
// relate `v` to the non-type-variable first (by passing it

0 commit comments

Comments
 (0)