Skip to content

Commit 77d9e38

Browse files
committed
add FIXME for bivariant lub/glb
1 parent d1033d0 commit 77d9e38

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

src/librustc/infer/glb.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ impl<'combine, 'infcx, 'gcx, 'tcx> TypeRelation<'infcx, 'gcx, 'tcx>
4949
match variance {
5050
ty::Invariant => self.fields.equate(self.a_is_expected).relate(a, b),
5151
ty::Covariant => self.relate(a, b),
52+
// FIXME(#41044) -- not correct, need test
5253
ty::Bivariant => Ok(a.clone()),
5354
ty::Contravariant => self.fields.lub(self.a_is_expected).relate(a, b),
5455
}

src/librustc/infer/lub.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ impl<'combine, 'infcx, 'gcx, 'tcx> TypeRelation<'infcx, 'gcx, 'tcx>
4949
match variance {
5050
ty::Invariant => self.fields.equate(self.a_is_expected).relate(a, b),
5151
ty::Covariant => self.relate(a, b),
52+
// FIXME(#41044) -- not correct, need test
5253
ty::Bivariant => Ok(a.clone()),
5354
ty::Contravariant => self.fields.glb(self.a_is_expected).relate(a, b),
5455
}

0 commit comments

Comments
 (0)