We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c7f0d95 commit adf4481Copy full SHA for adf4481
compiler/rustc_type_ir/src/relate.rs
@@ -411,7 +411,13 @@ pub fn structurally_relate_tys<I: Interner, R: TypeRelation<I>>(
411
}
412
413
(ty::Field(lcontainer, lpath), ty::Field(rcontainer, rpath)) => {
414
- let t = relation.relate(lcontainer, rcontainer)?;
+ let t = relation.relate_with_variance(
415
+ ty::Invariant,
416
+ VarianceDiagInfo::default(),
417
+ lcontainer,
418
+ rcontainer,
419
+ )?;
420
+
421
if lpath == rpath {
422
Ok(Ty::new_field_type(cx, t, lpath))
423
} else {
0 commit comments