1
Fork 0

Make EvaluationCache consider polarity as cache's key

This commit is contained in:
Santiago Pastorino 2021-10-14 17:57:23 -03:00
parent da8873e343
commit 85c8fd9c94
No known key found for this signature in database
GPG key ID: 8131A24E0C79EFAF
2 changed files with 28 additions and 8 deletions

View file

@ -16,8 +16,10 @@ pub type SelectionCache<'tcx> = Cache<
SelectionResult<'tcx, SelectionCandidate<'tcx>>,
>;
pub type EvaluationCache<'tcx> =
Cache<ty::ParamEnvAnd<'tcx, ty::ConstnessAnd<ty::PolyTraitRef<'tcx>>>, EvaluationResult>;
pub type EvaluationCache<'tcx> = Cache<
(ty::ParamEnvAnd<'tcx, ty::ConstnessAnd<ty::PolyTraitRef<'tcx>>>, ty::ImplPolarity),
EvaluationResult,
>;
/// The selection process begins by considering all impls, where
/// clauses, and so forth that might resolve an obligation. Sometimes