From: Alex Crichton Date: Thu, 29 May 2014 07:26:17 +0000 (-0700) Subject: rustdoc: Filter inlining private external items X-Git-Url: https://git.lizzy.rs/?a=commitdiff_plain;h=c2564b8fd4f9669d2426e0e637e71139e2004ea3;p=rust.git rustdoc: Filter inlining private external items This prevents structures like RcBox from showing up in the documentation --- 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) {