Rollup merge of #125597 - compiler-errors:early-binder, r=jackh726
Uplift `EarlyBinder` into `rustc_type_ir` We also need to give `EarlyBinder` a `'tcx` param, so that we can carry the `Interner` in the `EarlyBinder` too. This is necessary because otherwise we have an unconstrained `I: Interner` parameter in many of the `EarlyBinder`'s inherent impls. I also generally think that this is desirable to have, in case we later want to track some state in the `EarlyBinder`. r? lcnr
This commit is contained in:
commit
a9c125f864
43 changed files with 786 additions and 705 deletions
|
@ -2097,7 +2097,7 @@ fn confirm_impl_candidate<'cx, 'tcx>(
|
|||
let args = translate_args(selcx.infcx, param_env, impl_def_id, args, assoc_ty.defining_node);
|
||||
let ty = tcx.type_of(assoc_ty.item.def_id);
|
||||
let is_const = matches!(tcx.def_kind(assoc_ty.item.def_id), DefKind::AssocConst);
|
||||
let term: ty::EarlyBinder<ty::Term<'tcx>> = if is_const {
|
||||
let term: ty::EarlyBinder<'tcx, ty::Term<'tcx>> = if is_const {
|
||||
let did = assoc_ty.item.def_id;
|
||||
let identity_args = crate::traits::GenericArgs::identity_for_item(tcx, did);
|
||||
let uv = ty::UnevaluatedConst::new(did, identity_args);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue