Skip to content

Commit c2564b8

Browse files
committed
rustdoc: Filter inlining private external items
This prevents structures like RcBox from showing up in the documentation
1 parent c2e3aa3 commit c2564b8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/librustdoc/clean/inline.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,8 @@ fn build_module(cx: &core::DocContext, tcx: &ty::ctxt,
259259

260260
// FIXME: this doesn't handle reexports inside the module itself.
261261
// Should they be handled?
262-
csearch::each_child_of_item(&tcx.sess.cstore, did, |def, _, _| {
262+
csearch::each_child_of_item(&tcx.sess.cstore, did, |def, _, vis| {
263+
if vis != ast::Public { return }
263264
match def {
264265
decoder::DlDef(def) => {
265266
match try_inline_def(cx, tcx, def) {

0 commit comments

Comments
 (0)