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
|
@ -449,7 +449,7 @@ impl<'tcx> TypeFolder<TyCtxt<'tcx>> for RemapLateBound<'_, 'tcx> {
|
|||
pub(super) fn collect_return_position_impl_trait_in_trait_tys<'tcx>(
|
||||
tcx: TyCtxt<'tcx>,
|
||||
impl_m_def_id: LocalDefId,
|
||||
) -> Result<&'tcx DefIdMap<ty::EarlyBinder<Ty<'tcx>>>, ErrorGuaranteed> {
|
||||
) -> Result<&'tcx DefIdMap<ty::EarlyBinder<'tcx, Ty<'tcx>>>, ErrorGuaranteed> {
|
||||
let impl_m = tcx.opt_associated_item(impl_m_def_id.to_def_id()).unwrap();
|
||||
let trait_m = tcx.opt_associated_item(impl_m.trait_item_def_id.unwrap()).unwrap();
|
||||
let impl_trait_ref =
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue