about summary refs log tree commit diff
path: root/src/librustdoc/html
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2016-06-09 01:35:26 -0700
committerbors <bors@rust-lang.org>2016-06-09 01:35:26 -0700
commit24526cc3cc53cecb6e73275ae96b4e698b305931 (patch)
treea1ce26874320acac847c88f02dacbbda911d6be2 /src/librustdoc/html
parentdc77c5ebe80d8e8fe08b9ba05859c04f4dbb99cf (diff)
parent970e15d3c321b8295ff6675c3bc001845ed0c0b5 (diff)
Auto merge of #34108 - jseyfried:refactor_prelude_injection, r=nrc
Refactor away the prelude injection fold

Instead, just inject `#[prelude_import] use [core|std]::prelude::v1::*;` at the crate root while injecting `extern crate [core|std];` and process `#[no_implicit_prelude]` attributes in `resolve`.

r? @nrc
Diffstat (limited to 'src/librustdoc/html')
-rw-r--r--src/librustdoc/html/render.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/librustdoc/html/render.rs b/src/librustdoc/html/render.rs
index 34f56c95ecf..dc1ef5d94a4 100644
--- a/src/librustdoc/html/render.rs
+++ b/src/librustdoc/html/render.rs
@@ -1820,7 +1820,10 @@ fn item_module(w: &mut fmt::Formatter, cx: &Context,
         }
     }
 
-    write!(w, "</table>")
+    if curty.is_some() {
+        write!(w, "</table>")?;
+    }
+    Ok(())
 }
 
 fn short_stability(item: &clean::Item, cx: &Context, show_reason: bool) -> Vec<String> {