resolve/metadata: Stop encoding macros as reexports
This commit is contained in:
parent
50568b8ee5
commit
179ce18c5c
6 changed files with 47 additions and 23 deletions
|
@ -133,7 +133,7 @@ impl<'r, 'ast> Visitor<'ast> for AccessLevelsVisitor<'ast, 'r> {
|
|||
ast::ItemKind::Impl(..) => return,
|
||||
|
||||
// Only exported `macro_rules!` items are public, but they always are
|
||||
ast::ItemKind::MacroDef(..) => {
|
||||
ast::ItemKind::MacroDef(ref macro_def) if macro_def.macro_rules => {
|
||||
let is_macro_export =
|
||||
item.attrs.iter().any(|attr| attr.has_name(sym::macro_export));
|
||||
if is_macro_export { Some(AccessLevel::Public) } else { None }
|
||||
|
@ -155,7 +155,8 @@ impl<'r, 'ast> Visitor<'ast> for AccessLevelsVisitor<'ast, 'r> {
|
|||
| ast::ItemKind::Struct(..)
|
||||
| ast::ItemKind::Union(..)
|
||||
| ast::ItemKind::Trait(..)
|
||||
| ast::ItemKind::TraitAlias(..) => {
|
||||
| ast::ItemKind::TraitAlias(..)
|
||||
| ast::ItemKind::MacroDef(..) => {
|
||||
if item.vis.kind.is_pub() {
|
||||
self.prev_level
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue