1
Fork 0

Apply EarlyBinder only to TraitRef in ImplTraitHeader

This commit is contained in:
Yoshitomo Nakanishi 2024-03-05 20:19:05 +01:00
parent 8c9a75b323
commit 9669934798
22 changed files with 74 additions and 82 deletions

View file

@ -1993,9 +1993,8 @@ impl<'a, 'tcx> EncodeContext<'a, 'tcx> {
if of_trait && let Some(header) = tcx.impl_trait_header(def_id) {
record!(self.tables.impl_trait_header[def_id] <- header);
let trait_ref = header.map_bound(|h| h.trait_ref);
let trait_ref = trait_ref.instantiate_identity();
let trait_ref = header.trait_ref.instantiate_identity();
let simplified_self_ty = fast_reject::simplify_type(
self.tcx,
trait_ref.self_ty(),

View file

@ -423,7 +423,7 @@ define_tables! {
variances_of: Table<DefIndex, LazyArray<ty::Variance>>,
fn_sig: Table<DefIndex, LazyValue<ty::EarlyBinder<ty::PolyFnSig<'static>>>>,
codegen_fn_attrs: Table<DefIndex, LazyValue<CodegenFnAttrs>>,
impl_trait_header: Table<DefIndex, LazyValue<ty::EarlyBinder<ty::ImplTraitHeader<'static>>>>,
impl_trait_header: Table<DefIndex, LazyValue<ty::ImplTraitHeader<'static>>>,
const_param_default: Table<DefIndex, LazyValue<ty::EarlyBinder<rustc_middle::ty::Const<'static>>>>,
object_lifetime_default: Table<DefIndex, LazyValue<ObjectLifetimeDefault>>,
optimized_mir: Table<DefIndex, LazyValue<mir::Body<'static>>>,