1
Fork 0

Rollup merge of #99558 - fee1-dead-contrib:remap_constness_fix, r=oli-obk

Fix `remap_constness`

`~const Drop` was renamed to `~const Destruct` and this special case should
be removed
This commit is contained in:
Matthias Krüger 2022-07-21 18:42:11 +02:00 committed by GitHub
commit b068dc7392
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 13 deletions

View file

@ -789,7 +789,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
let mut param_env = obligation.param_env;
fresh_trait_pred = fresh_trait_pred.map_bound(|mut pred| {
pred.remap_constness(self.tcx(), &mut param_env);
pred.remap_constness(&mut param_env);
pred
});
@ -1321,7 +1321,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
}
let tcx = self.tcx();
let mut pred = cache_fresh_trait_pred.skip_binder();
pred.remap_constness(tcx, &mut param_env);
pred.remap_constness(&mut param_env);
if self.can_use_global_caches(param_env) {
if let Some(res) = tcx.selection_cache.get(&(param_env, pred), tcx) {
@ -1375,7 +1375,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
let tcx = self.tcx();
let mut pred = cache_fresh_trait_pred.skip_binder();
pred.remap_constness(tcx, &mut param_env);
pred.remap_constness(&mut param_env);
if !self.can_cache_candidate(&candidate) {
debug!(?pred, ?candidate, "insert_candidate_cache - candidate is not cacheable");