No const equate in new solver
This commit is contained in:
parent
2c1473ca70
commit
8912015f71
2 changed files with 7 additions and 13 deletions
|
@ -322,10 +322,13 @@ impl<'a, 'tcx> EvalCtxt<'a, 'tcx> {
|
||||||
ty::PredicateKind::Ambiguous => {
|
ty::PredicateKind::Ambiguous => {
|
||||||
self.evaluate_added_goals_and_make_canonical_response(Certainty::AMBIGUOUS)
|
self.evaluate_added_goals_and_make_canonical_response(Certainty::AMBIGUOUS)
|
||||||
}
|
}
|
||||||
// FIXME: implement these predicates :)
|
// FIXME: implement this predicate :)
|
||||||
ty::PredicateKind::ConstEvaluatable(_) | ty::PredicateKind::ConstEquate(_, _) => {
|
ty::PredicateKind::ConstEvaluatable(_) => {
|
||||||
self.evaluate_added_goals_and_make_canonical_response(Certainty::Yes)
|
self.evaluate_added_goals_and_make_canonical_response(Certainty::Yes)
|
||||||
}
|
}
|
||||||
|
ty::PredicateKind::ConstEquate(_, _) => {
|
||||||
|
bug!("ConstEquate should not be emitted when `-Ztrait-solver=next` is active")
|
||||||
|
}
|
||||||
ty::PredicateKind::TypeWellFormedFromEnv(..) => {
|
ty::PredicateKind::TypeWellFormedFromEnv(..) => {
|
||||||
bug!("TypeWellFormedFromEnv is only used for Chalk")
|
bug!("TypeWellFormedFromEnv is only used for Chalk")
|
||||||
}
|
}
|
||||||
|
|
|
@ -118,16 +118,6 @@ impl<'tcx> TraitEngine<'tcx> for FulfillmentCtxt<'tcx> {
|
||||||
TypeError::Sorts(expected_found),
|
TypeError::Sorts(expected_found),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
ty::PredicateKind::ConstEquate(a, b) => {
|
|
||||||
let (a, b) = infcx.instantiate_binder_with_placeholders(
|
|
||||||
goal.predicate.kind().rebind((a, b)),
|
|
||||||
);
|
|
||||||
let expected_found = ExpectedFound::new(true, a, b);
|
|
||||||
FulfillmentErrorCode::CodeConstEquateError(
|
|
||||||
expected_found,
|
|
||||||
TypeError::ConstMismatch(expected_found),
|
|
||||||
)
|
|
||||||
}
|
|
||||||
ty::PredicateKind::Clause(_)
|
ty::PredicateKind::Clause(_)
|
||||||
| ty::PredicateKind::WellFormed(_)
|
| ty::PredicateKind::WellFormed(_)
|
||||||
| ty::PredicateKind::ObjectSafe(_)
|
| ty::PredicateKind::ObjectSafe(_)
|
||||||
|
@ -138,7 +128,8 @@ impl<'tcx> TraitEngine<'tcx> for FulfillmentCtxt<'tcx> {
|
||||||
SelectionError::Unimplemented,
|
SelectionError::Unimplemented,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
ty::PredicateKind::TypeWellFormedFromEnv(_) => {
|
ty::PredicateKind::ConstEquate(..)
|
||||||
|
| ty::PredicateKind::TypeWellFormedFromEnv(_) => {
|
||||||
bug!("unexpected goal: {goal:?}")
|
bug!("unexpected goal: {goal:?}")
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue