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