1
Fork 0

Auto merge of #106696 - kylematsuda:early-binder, r=lcnr

Switch to `EarlyBinder` for `const_param_default` and `impl_trait_ref` queries

Part of the work to close #105779 and implement https://github.com/rust-lang/types-team/issues/78.

Several queries `X` have a `bound_X` variant that wraps the output in `EarlyBinder`. This PR adds `EarlyBinder` to the return type of  `const_param_default` and `impl_trait_ref`, and removes their `bound_X` variants.

r? `@lcnr`
This commit is contained in:
bors 2023-01-14 17:44:30 +00:00
commit b8f9cb345a
55 changed files with 145 additions and 112 deletions

View file

@ -320,6 +320,7 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
.impl_trait_ref(impl_def_id)
else { return; };
let trait_substs = trait_ref
.subst_identity()
// Replace the explicit self type with `Self` for better suggestion rendering
.with_self_ty(self.tcx, self.tcx.mk_ty_param(0, kw::SelfUpper))
.substs;