Don't store lazyness in DefKind
This commit is contained in:
parent
c614c17626
commit
d6ce9ce115
51 changed files with 128 additions and 189 deletions
|
@ -588,7 +588,7 @@ impl<'tcx> EmbargoVisitor<'tcx> {
|
|||
self.update(def_id, macro_ev, Level::Reachable);
|
||||
match def_kind {
|
||||
// No type privacy, so can be directly marked as reachable.
|
||||
DefKind::Const | DefKind::Static(_) | DefKind::TraitAlias | DefKind::TyAlias { .. } => {
|
||||
DefKind::Const | DefKind::Static(_) | DefKind::TraitAlias | DefKind::TyAlias => {
|
||||
if vis.is_accessible_from(module, self.tcx) {
|
||||
self.update(def_id, macro_ev, Level::Reachable);
|
||||
}
|
||||
|
@ -1637,8 +1637,8 @@ impl<'tcx> PrivateItemsInPublicInterfacesChecker<'tcx, '_> {
|
|||
let def_kind = tcx.def_kind(def_id);
|
||||
|
||||
match def_kind {
|
||||
DefKind::Const | DefKind::Static(_) | DefKind::Fn | DefKind::TyAlias { .. } => {
|
||||
if let DefKind::TyAlias { .. } = def_kind {
|
||||
DefKind::Const | DefKind::Static(_) | DefKind::Fn | DefKind::TyAlias => {
|
||||
if let DefKind::TyAlias = def_kind {
|
||||
self.check_unnameable(def_id, effective_vis);
|
||||
}
|
||||
self.check(def_id, item_visibility, effective_vis).generics().predicates().ty();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue