Skip to content

Commit f0cee82

Browse files
committed
---
yaml --- r: 126839 b: refs/heads/snap-stage3 c: 98f4863 h: refs/heads/master i: 126837: 44f3546 126835: acf40ce 126831: 3114bb7 v: v3
1 parent e0013df commit f0cee82

File tree

2 files changed

+23
-17
lines changed

2 files changed

+23
-17
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: 7be8f0af0393dcdb077c2f6b1653836fd3fba235
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: 8d7eb0598a9147f0ec92b1f333360e5e912ab546
4+
refs/heads/snap-stage3: 98f48630fc511c66b830571b028ebebe3911fa6f
55
refs/heads/try: 502e4c045236682e9728539dc0d2b3d0b237f55c
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b

branches/snap-stage3/src/librustdoc/clean/inline.rs

Lines changed: 22 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -364,27 +364,33 @@ fn build_impl(cx: &core::DocContext,
364364
fn build_module(cx: &core::DocContext, tcx: &ty::ctxt,
365365
did: ast::DefId) -> clean::Module {
366366
let mut items = Vec::new();
367+
fill_in(cx, tcx, did, &mut items);
368+
return clean::Module {
369+
items: items,
370+
is_crate: false,
371+
};
367372

368373
// FIXME: this doesn't handle reexports inside the module itself.
369374
// Should they be handled?
370-
csearch::each_child_of_item(&tcx.sess.cstore, did, |def, _, vis| {
371-
if vis != ast::Public { return }
372-
match def {
373-
decoder::DlDef(def) => {
374-
match try_inline_def(cx, tcx, def) {
375-
Some(i) => items.extend(i.move_iter()),
376-
None => {}
375+
fn fill_in(cx: &core::DocContext, tcx: &ty::ctxt, did: ast::DefId,
376+
items: &mut Vec<clean::Item>) {
377+
csearch::each_child_of_item(&tcx.sess.cstore, did, |def, _, vis| {
378+
match def {
379+
decoder::DlDef(def::DefForeignMod(did)) => {
380+
fill_in(cx, tcx, did, items);
381+
}
382+
decoder::DlDef(def) if vis == ast::Public => {
383+
match try_inline_def(cx, tcx, def) {
384+
Some(i) => items.extend(i.move_iter()),
385+
None => {}
386+
}
377387
}
388+
decoder::DlDef(..) => {}
389+
// All impls were inlined above
390+
decoder::DlImpl(..) => {}
391+
decoder::DlField => fail!("unimplemented field"),
378392
}
379-
// All impls were inlined above
380-
decoder::DlImpl(..) => {}
381-
decoder::DlField => fail!("unimplemented field"),
382-
}
383-
});
384-
385-
clean::Module {
386-
items: items,
387-
is_crate: false,
393+
});
388394
}
389395
}
390396

0 commit comments

Comments
 (0)