]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_trait_selection/src/traits/relationships.rs
Rollup merge of #92098 - semarie:openbsd-platform, r=pietroalbini
[rust.git] / compiler / rustc_trait_selection / src / traits / relationships.rs
index e0098cc92d51569ac0509b08e34024fca73648b1..aea44841b8f128b9345c128c2019b9155d221199 100644 (file)
@@ -62,7 +62,7 @@ pub(crate) fn update<'tcx, T>(
     if let ty::PredicateKind::Projection(predicate) = obligation.predicate.kind().skip_binder() {
         // If the projection predicate (Foo::Bar == X) has X as a non-TyVid,
         // we need to make it into one.
-        if let Some(vid) = predicate.ty.ty_vid() {
+        if let Some(vid) = predicate.term.ty().and_then(|ty| ty.ty_vid()) {
             debug!("relationship: {:?}.output = true", vid);
             engine.relationships().entry(vid).or_default().output = true;
         }