about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2014-05-29 00:26:17 -0700
committerAlex Crichton <alex@alexcrichton.com>2014-05-31 21:59:50 -0700
commitc2564b8fd4f9669d2426e0e637e71139e2004ea3 (patch)
tree8afef39a4b618a1588da752c5d4b511f18cf58a6
parentc2e3aa37daedf698072b4aadbc420f24505b2b2d (diff)
downloadrust-c2564b8fd4f9669d2426e0e637e71139e2004ea3.tar.gz
rust-c2564b8fd4f9669d2426e0e637e71139e2004ea3.zip
rustdoc: Filter inlining private external items
This prevents structures like RcBox from showing up in the documentation
-rw-r--r--src/librustdoc/clean/inline.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/librustdoc/clean/inline.rs b/src/librustdoc/clean/inline.rs
index 2f096346c9b..b60e0a70dd0 100644
--- a/src/librustdoc/clean/inline.rs
+++ b/src/librustdoc/clean/inline.rs
@@ -259,7 +259,8 @@ fn build_module(cx: &core::DocContext, tcx: &ty::ctxt,
 
     // FIXME: this doesn't handle reexports inside the module itself.
     //        Should they be handled?
-    csearch::each_child_of_item(&tcx.sess.cstore, did, |def, _, _| {
+    csearch::each_child_of_item(&tcx.sess.cstore, did, |def, _, vis| {
+        if vis != ast::Public { return }
         match def {
             decoder::DlDef(def) => {
                 match try_inline_def(cx, tcx, def) {