1
Fork 0

include ParamEnv in projection cache key

This commit is contained in:
Lukas Markeffsky 2024-04-20 16:42:18 +02:00
parent 584f183dc0
commit 88b10c1162
4 changed files with 19 additions and 13 deletions

View file

@ -78,11 +78,12 @@ pub struct ProjectionCacheStorage<'tcx> {
#[derive(Copy, Clone, Debug, Hash, PartialEq, Eq)]
pub struct ProjectionCacheKey<'tcx> {
ty: ty::AliasTy<'tcx>,
param_env: ty::ParamEnv<'tcx>,
}
impl<'tcx> ProjectionCacheKey<'tcx> {
pub fn new(ty: ty::AliasTy<'tcx>) -> Self {
Self { ty }
pub fn new(ty: ty::AliasTy<'tcx>, param_env: ty::ParamEnv<'tcx>) -> Self {
Self { ty, param_env }
}
}