about summary refs log tree commit diff
path: root/src/librustdoc/html/render.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/librustdoc/html/render.rs')
-rw-r--r--src/librustdoc/html/render.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/librustdoc/html/render.rs b/src/librustdoc/html/render.rs
index be62b1cc36f..6415ee85f57 100644
--- a/src/librustdoc/html/render.rs
+++ b/src/librustdoc/html/render.rs
@@ -259,7 +259,8 @@ pub fn run(mut krate: clean::Crate, external_html: &ExternalHtml, dst: Path) ->
 
     // Crawl the crate attributes looking for attributes which control how we're
     // going to emit HTML
-    match krate.module.as_ref().map(|m| m.doc_list().unwrap_or(&[])) {
+    let default: &[_] = &[];
+    match krate.module.as_ref().map(|m| m.doc_list().unwrap_or(default)) {
         Some(attrs) => {
             for attr in attrs.iter() {
                 match *attr {