Remap more env constness for queries

This commit is contained in:
Deadbeef
2021-12-07 20:40:06 +08:00
parent 2bea3b3aa3
commit 17b53b9645
5 changed files with 40 additions and 18 deletions

View File

@@ -1354,6 +1354,10 @@ impl<'tcx> ParamEnv<'tcx> {
self
}
pub fn remap_constness_with(&mut self, mut constness: ty::BoundConstness) {
*self = self.with_constness(constness.and(self.constness()))
}
/// Returns a new parameter environment with the same clauses, but
/// which "reveals" the true results of projections in all cases
/// (even for associated types that are specializable). This is