Fix TyKind lint, make consts no longer fn, etc
This commit is contained in:
parent
a056a953f0
commit
34e05812e0
17 changed files with 868 additions and 538 deletions
|
@ -32,9 +32,7 @@ use rustc_hir::def_id::DefId;
|
|||
use rustc_hir::lang_items::LangItem;
|
||||
use rustc_middle::ty::fold::TypeFoldable;
|
||||
use rustc_middle::ty::subst::{InternalSubsts, SubstsRef};
|
||||
use rustc_middle::ty::{
|
||||
self, common_vtable_entries, GenericParamDefKind, ToPredicate, Ty, TyCtxt, VtblEntry,
|
||||
};
|
||||
use rustc_middle::ty::{self, GenericParamDefKind, ToPredicate, Ty, TyCtxt, VtblEntry};
|
||||
use rustc_span::{sym, Span};
|
||||
use smallvec::SmallVec;
|
||||
|
||||
|
@ -695,7 +693,7 @@ fn vtable_entries<'tcx>(
|
|||
let vtable_segment_callback = |segment| -> ControlFlow<()> {
|
||||
match segment {
|
||||
VtblSegment::MetadataDSA => {
|
||||
entries.extend(common_vtable_entries());
|
||||
entries.extend(TyCtxt::COMMON_VTABLE_ENTRIES);
|
||||
}
|
||||
VtblSegment::TraitOwnEntries { trait_ref, emit_vptr } => {
|
||||
let existential_trait_ref = trait_ref
|
||||
|
@ -785,7 +783,7 @@ fn vtable_trait_first_method_offset<'tcx>(
|
|||
move |segment| {
|
||||
match segment {
|
||||
VtblSegment::MetadataDSA => {
|
||||
vtable_base += common_vtable_entries().len();
|
||||
vtable_base += TyCtxt::COMMON_VTABLE_ENTRIES.len();
|
||||
}
|
||||
VtblSegment::TraitOwnEntries { trait_ref, emit_vptr } => {
|
||||
if tcx.erase_regions(trait_ref) == trait_to_be_found_erased {
|
||||
|
|
|
@ -12,7 +12,7 @@ use rustc_index::bit_set::GrowableBitSet;
|
|||
use rustc_infer::infer::InferOk;
|
||||
use rustc_infer::infer::LateBoundRegionConversionTime::HigherRankedType;
|
||||
use rustc_middle::ty::subst::{GenericArg, GenericArgKind, InternalSubsts, Subst, SubstsRef};
|
||||
use rustc_middle::ty::{self, EarlyBinder, GenericParamDefKind, Ty};
|
||||
use rustc_middle::ty::{self, EarlyBinder, GenericParamDefKind, Ty, TyCtxt};
|
||||
use rustc_middle::ty::{ToPolyTraitRef, ToPredicate};
|
||||
use rustc_span::def_id::DefId;
|
||||
|
||||
|
@ -834,7 +834,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
|
|||
move |segment| {
|
||||
match segment {
|
||||
VtblSegment::MetadataDSA => {
|
||||
vptr_offset += ty::common_vtable_entries().len();
|
||||
vptr_offset += TyCtxt::COMMON_VTABLE_ENTRIES.len();
|
||||
}
|
||||
VtblSegment::TraitOwnEntries { trait_ref, emit_vptr } => {
|
||||
vptr_offset += util::count_own_vtable_entries(tcx, trait_ref);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue