1
Fork 0

Make selection and evaluation caches use constness

This commit is contained in:
Deadbeef 2021-07-24 19:12:24 +08:00
parent 36ace4c0ad
commit 3bab45d2ac
No known key found for this signature in database
GPG key ID: 027DF9338862ADDD
2 changed files with 59 additions and 32 deletions

View file

@ -12,12 +12,12 @@ use rustc_hir::def_id::DefId;
use rustc_query_system::cache::Cache;
pub type SelectionCache<'tcx> = Cache<
ty::ParamEnvAnd<'tcx, ty::TraitRef<'tcx>>,
ty::ConstnessAnd<ty::ParamEnvAnd<'tcx, ty::TraitRef<'tcx>>>,
SelectionResult<'tcx, SelectionCandidate<'tcx>>,
>;
pub type EvaluationCache<'tcx> =
Cache<ty::ParamEnvAnd<'tcx, ty::PolyTraitRef<'tcx>>, EvaluationResult>;
Cache<ty::ParamEnvAnd<'tcx, ty::ConstnessAnd<ty::PolyTraitRef<'tcx>>>, EvaluationResult>;
/// The selection process begins by considering all impls, where
/// clauses, and so forth that might resolve an obligation. Sometimes