]> git.lizzy.rs Git - rust.git/blobdiff - src/librustdoc/lib.rs
Use empty Cache for methods requiring it when filling Cache itself
[rust.git] / src / librustdoc / lib.rs
index 2dddcd1c34640ce6f67c2e32196c25eaaa3778b1..c61cbf78f771a2909d3ae5b39ebb56e6e3c9d516 100644 (file)
@@ -18,6 +18,7 @@
 #![feature(str_split_once)]
 #![feature(iter_intersperse)]
 #![recursion_limit = "256"]
+#![deny(rustc::internal)]
 
 #[macro_use]
 extern crate lazy_static;
@@ -167,6 +168,14 @@ fn opts() -> Vec<RustcOptGroup> {
         stable("test-args", |o| {
             o.optmulti("", "test-args", "arguments to pass to the test runner", "ARGS")
         }),
+        unstable("test-run-directory", |o| {
+            o.optopt(
+                "",
+                "test-run-directory",
+                "The working directory in which to run tests",
+                "PATH",
+            )
+        }),
         stable("target", |o| o.optopt("", "target", "target triple to document", "TRIPLE")),
         stable("markdown-css", |o| {
             o.optmulti(
@@ -539,7 +548,7 @@ fn main_options(options: config::Options) -> MainResult {
                 sess.fatal("Compilation failed, aborting rustdoc");
             }
 
-            let mut global_ctxt = abort_on_err(queries.global_ctxt(), sess).take();
+            let mut global_ctxt = abort_on_err(queries.global_ctxt(), sess).peek_mut();
 
             global_ctxt.enter(|tcx| {
                 let (mut krate, render_info, render_opts) = sess.time("run_global_ctxt", || {