1
Fork 0

clean module docs while its module ID is still on the stack

This commit is contained in:
QuietMisdreavus 2018-01-08 10:07:16 -06:00 committed by Manish Goregaokar
parent eca3c55881
commit 1a62b17f7d

View file

@ -476,6 +476,7 @@ impl Clean<Item> for doctree::Module {
// we could also pass this down through clean() // we could also pass this down through clean()
// but that might complicate things. // but that might complicate things.
cx.mod_ids.borrow_mut().push(self.id); cx.mod_ids.borrow_mut().push(self.id);
let attrs = self.attrs.clean(cx);
let mut items: Vec<Item> = vec![]; let mut items: Vec<Item> = vec![];
items.extend(self.extern_crates.iter().map(|x| x.clean(cx))); items.extend(self.extern_crates.iter().map(|x| x.clean(cx)));
@ -512,7 +513,7 @@ impl Clean<Item> for doctree::Module {
Item { Item {
name: Some(name), name: Some(name),
attrs: self.attrs.clean(cx), attrs,
source: whence.clean(cx), source: whence.clean(cx),
visibility: self.vis.clean(cx), visibility: self.vis.clean(cx),
stability: self.stab.clean(cx), stability: self.stab.clean(cx),