Skip to content

Commit dd15f41

Browse files
WIP: attempt to fix the undocument re-export issue
1 parent 28e9c67 commit dd15f41

File tree

1 file changed

+13
-2
lines changed
  • compiler/rustc_privacy/src

1 file changed

+13
-2
lines changed

compiler/rustc_privacy/src/lib.rs

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff 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;

0 commit comments

Comments
 (0)