about summary refs log tree commit diff
path: root/src/librustdoc/markdown_index_pass.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/librustdoc/markdown_index_pass.rs')
-rw-r--r--src/librustdoc/markdown_index_pass.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/librustdoc/markdown_index_pass.rs b/src/librustdoc/markdown_index_pass.rs
index 0c5a31ea7ed..c5db7685080 100644
--- a/src/librustdoc/markdown_index_pass.rs
+++ b/src/librustdoc/markdown_index_pass.rs
@@ -102,10 +102,11 @@ fn item_to_entry(
     let link = match doc {
       doc::ModTag(_) | doc::NmodTag(_)
       if config.output_style == config::DocPerMod => {
-        markdown_writer::make_filename(config, doc::ItemPage(doc)).to_str()
+        markdown_writer::make_filename(config,
+                                       doc::ItemPage(copy doc)).to_str()
       }
       _ => {
-        ~"#" + pandoc_header_id(markdown_pass::header_text(doc))
+        ~"#" + pandoc_header_id(markdown_pass::header_text(copy doc))
       }
     };