Make TraitEngine::new use the right solver, add compare mode
This commit is contained in:
parent
b637048a89
commit
3d4da98273
8 changed files with 49 additions and 32 deletions
|
@ -231,17 +231,15 @@ impl<'tcx> InferCtxt<'tcx> {
|
|||
{
|
||||
let (a, b) = if relation.a_is_expected() { (a, b) } else { (b, a) };
|
||||
|
||||
relation.register_predicates([ty::Binder::dummy(
|
||||
if self.next_trait_solver() {
|
||||
ty::PredicateKind::AliasRelate(
|
||||
a.into(),
|
||||
b.into(),
|
||||
ty::AliasRelationDirection::Equate,
|
||||
)
|
||||
} else {
|
||||
ty::PredicateKind::ConstEquate(a, b)
|
||||
},
|
||||
)]);
|
||||
relation.register_predicates([ty::Binder::dummy(if self.next_trait_solver() {
|
||||
ty::PredicateKind::AliasRelate(
|
||||
a.into(),
|
||||
b.into(),
|
||||
ty::AliasRelationDirection::Equate,
|
||||
)
|
||||
} else {
|
||||
ty::PredicateKind::ConstEquate(a, b)
|
||||
})]);
|
||||
|
||||
return Ok(b);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue