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 3418d5d commit 9899464Copy full SHA for 9899464
compiler/rustc_trait_selection/src/solve/delegate.rs
@@ -125,6 +125,17 @@ impl<'tcx> rustc_next_trait_solver::delegate::SolverDelegate for SolverDelegate<
125
126
Some(Certainty::Yes)
127
}
128
+ ty::PredicateKind::Subtype(ty::SubtypePredicate { a, b, .. })
129
+ | ty::PredicateKind::Coerce(ty::CoercePredicate { a, b }) => {
130
+ if self.shallow_resolve(a).is_ty_var() && self.shallow_resolve(b).is_ty_var() {
131
+ // FIXME: We also need to register a subtype relation between these vars
132
+ // when those are added, and if they aren't in the same sub root then
133
+ // we should mark this goal as `has_changed`.
134
+ Some(Certainty::AMBIGUOUS)
135
+ } else {
136
+ None
137
+ }
138
139
_ => None,
140
141
0 commit comments