diff options
| author | QuietMisdreavus <grey@quietmisdreavus.net> | 2018-01-08 10:07:16 -0600 |
|---|---|---|
| committer | Manish Goregaokar <manishsmail@gmail.com> | 2018-01-22 15:24:30 +0530 |
| commit | 1a62b17f7d68dfa1ec2f25e02e5cd3dc0095ea94 (patch) | |
| tree | 8b7bc9deb91c203f29f6dc1a165c83a9ae32226e | |
| parent | eca3c558817ad6f2be485515d0131c6bbd80340e (diff) | |
| download | rust-1a62b17f7d68dfa1ec2f25e02e5cd3dc0095ea94.tar.gz rust-1a62b17f7d68dfa1ec2f25e02e5cd3dc0095ea94.zip | |
clean module docs while its module ID is still on the stack
| -rw-r--r-- | src/librustdoc/clean/mod.rs | 3 |
1 files changed, 2 insertions, 1 deletions
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<Item> 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<Item> = vec![]; items.extend(self.extern_crates.iter().map(|x| x.clean(cx))); @@ -512,7 +513,7 @@ impl Clean<Item> 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), |
