File tree Expand file tree Collapse file tree 1 file changed +13
-2
lines changed
compiler/rustc_privacy/src Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -832,8 +832,19 @@ impl Visitor<'tcx> for EmbargoVisitor<'tcx> {
832832 }
833833
834834 fn visit_macro_def ( & mut self , md : & ' tcx hir:: MacroDef < ' tcx > ) {
835- if attr:: find_transparency ( & self . tcx . sess , & md. attrs , md. ast . macro_rules ) . 0
836- != Transparency :: Opaque
835+ // HACK (or fix?): a
836+ // ```rust,ignore (dummy example)
837+ // mod private {
838+ // #[rustc_macro_transparency(semitransparent)]
839+ // pub macro m { … }
840+ // }
841+ // ```
842+ // is *not* `Public`ly reachable and yet this shortcut would express
843+ // that.
844+ // FIXME!
845+ if md. ast . macro_rules
846+ && attr:: find_transparency ( & self . tcx . sess , & md. attrs , md. ast . macro_rules ) . 0
847+ != Transparency :: Opaque
837848 {
838849 self . update ( md. hir_id , Some ( AccessLevel :: Public ) ) ;
839850 return ;
You can’t perform that action at this time.
0 commit comments