review
This commit is contained in:
@@ -894,7 +894,8 @@ impl<'a, 'tcx> FindInferSourceVisitor<'a, 'tcx> {
|
||||
use ty::{Infer, TyVar};
|
||||
match (inner_ty.kind(), target_ty.kind()) {
|
||||
(&Infer(TyVar(a_vid)), &Infer(TyVar(b_vid))) => {
|
||||
self.tecx.sub_root_var(a_vid) == self.tecx.sub_root_var(b_vid)
|
||||
self.tecx.sub_unification_table_root_var(a_vid)
|
||||
== self.tecx.sub_unification_table_root_var(b_vid)
|
||||
}
|
||||
_ => false,
|
||||
}
|
||||
|
||||
@@ -128,7 +128,7 @@ impl<'tcx> rustc_next_trait_solver::delegate::SolverDelegate for SolverDelegate<
|
||||
| ty::PredicateKind::Coerce(ty::CoercePredicate { a, b }) => {
|
||||
match (self.shallow_resolve(a).kind(), self.shallow_resolve(b).kind()) {
|
||||
(&ty::Infer(ty::TyVar(a_vid)), &ty::Infer(ty::TyVar(b_vid))) => {
|
||||
self.sub_ty_vids_raw(a_vid, b_vid);
|
||||
self.sub_unify_ty_vids_raw(a_vid, b_vid);
|
||||
Some(Certainty::AMBIGUOUS)
|
||||
}
|
||||
_ => None,
|
||||
|
||||
Reference in New Issue
Block a user