]> git.lizzy.rs Git - rust.git/commitdiff
rustdoc: Filter inlining private external items
authorAlex Crichton <alex@alexcrichton.com>
Thu, 29 May 2014 07:26:17 +0000 (00:26 -0700)
committerAlex Crichton <alex@alexcrichton.com>
Sun, 1 Jun 2014 04:59:50 +0000 (21:59 -0700)
This prevents structures like RcBox from showing up in the documentation

src/librustdoc/clean/inline.rs

index 2f096346c9bef6b4de5a0140d3cdc03b01b7e0bf..b60e0a70dd0ec745a6b5b4397bff24b627b85c97 100644 (file)
@@ -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) {