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 b3a417a commit 24e172dCopy full SHA for 24e172d
compiler/rustc_trait_selection/src/solve/delegate.rs
@@ -109,6 +109,17 @@ impl<'tcx> rustc_next_trait_solver::delegate::SolverDelegate for SolverDelegate<
109
_ => None,
110
}
111
112
+ ty::PredicateKind::Subtype(ty::SubtypePredicate { a, b, .. })
113
+ | ty::PredicateKind::Coerce(ty::CoercePredicate { a, b }) => {
114
+ if self.shallow_resolve(a).is_ty_var() && self.shallow_resolve(b).is_ty_var() {
115
+ // FIXME: We also need to register a subtype relation between these vars
116
+ // when those are added, and if they aren't in the same sub root then
117
+ // we should mark this goal as `has_changed`.
118
+ Some(Certainty::AMBIGUOUS)
119
+ } else {
120
+ None
121
+ }
122
123
124
125
0 commit comments