ty::KContainer -> ty::AssocItemContainer::K
This commit is contained in:
parent
8e6af16192
commit
be4b0261c2
21 changed files with 59 additions and 61 deletions
|
@ -1203,8 +1203,8 @@ fn should_encode_type(tcx: TyCtxt<'_>, def_id: LocalDefId, def_kind: DefKind) ->
|
|||
DefKind::AssocTy => {
|
||||
let assoc_item = tcx.associated_item(def_id);
|
||||
match assoc_item.container {
|
||||
ty::AssocItemContainer::ImplContainer => true,
|
||||
ty::AssocItemContainer::TraitContainer => assoc_item.defaultness(tcx).has_value(),
|
||||
ty::AssocItemContainer::Impl => true,
|
||||
ty::AssocItemContainer::Trait => assoc_item.defaultness(tcx).has_value(),
|
||||
}
|
||||
}
|
||||
DefKind::TyParam => {
|
||||
|
@ -1336,7 +1336,7 @@ fn should_encode_const(def_kind: DefKind) -> bool {
|
|||
|
||||
fn should_encode_fn_impl_trait_in_trait<'tcx>(tcx: TyCtxt<'tcx>, def_id: DefId) -> bool {
|
||||
if let Some(assoc_item) = tcx.opt_associated_item(def_id)
|
||||
&& assoc_item.container == ty::AssocItemContainer::TraitContainer
|
||||
&& assoc_item.container == ty::AssocItemContainer::Trait
|
||||
&& assoc_item.kind == ty::AssocKind::Fn
|
||||
{
|
||||
true
|
||||
|
@ -1649,7 +1649,7 @@ impl<'a, 'tcx> EncodeContext<'a, 'tcx> {
|
|||
self.tables.assoc_container.set_some(def_id.index, item.container);
|
||||
|
||||
match item.container {
|
||||
AssocItemContainer::TraitContainer => {
|
||||
AssocItemContainer::Trait => {
|
||||
if let ty::AssocKind::Type = item.kind {
|
||||
self.encode_explicit_item_bounds(def_id);
|
||||
self.encode_explicit_item_super_predicates(def_id);
|
||||
|
@ -1659,7 +1659,7 @@ impl<'a, 'tcx> EncodeContext<'a, 'tcx> {
|
|||
}
|
||||
}
|
||||
}
|
||||
AssocItemContainer::ImplContainer => {
|
||||
AssocItemContainer::Impl => {
|
||||
if let Some(trait_item_def_id) = item.trait_item_def_id {
|
||||
self.tables.trait_item_def_id.set_some(def_id.index, trait_item_def_id.into());
|
||||
}
|
||||
|
|
|
@ -223,8 +223,8 @@ fixed_size_enum! {
|
|||
|
||||
fixed_size_enum! {
|
||||
ty::AssocItemContainer {
|
||||
( TraitContainer )
|
||||
( ImplContainer )
|
||||
( Trait )
|
||||
( Impl )
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue