Use the correct ParamEnv

This commit is contained in:
León Orell Valerian Liehr 2023-02-17 18:41:24 +01:00
parent 488d0c9efd
commit aa7edf7073
No known key found for this signature in database
GPG key ID: D17A07215F68E713
6 changed files with 41 additions and 3 deletions

View file

@ -2219,12 +2219,12 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
return Ok(None);
}
let param_env = tcx.param_env(block.owner.to_def_id());
let cause = ObligationCause::misc(span, block.owner.def_id);
let mut unsatisfied_predicates = Vec::new();
for &(impl_, (assoc_item, def_scope)) in &candidates {
let infcx = tcx.infer_ctxt().ignoring_regions().build();
let param_env = tcx.param_env(impl_);
let impl_ty = tcx.type_of(impl_);
let impl_substs = self.fresh_item_substs(impl_, &infcx);