Store the laziness of type aliases in the DefKind
This commit is contained in:
parent
34ccd04859
commit
5468336d6b
49 changed files with 208 additions and 93 deletions
|
@ -583,7 +583,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);
|
||||
}
|
||||
|
@ -1992,8 +1992,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