about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAliƩnore Bouttefeux <alienore.bouttefeux@gmail.com>2021-04-05 17:59:57 +0200
committerAliƩnore Bouttefeux <alienore.bouttefeux@gmail.com>2021-04-05 17:59:57 +0200
commita6bf81bbf71de4af70a97ad6d4fdc974e1d0e0ce (patch)
tree5fa89f21494b19ef853d93890f0741868e5406f3
parent0f3efe25b9c02c6b70cf68798ff0626023246c80 (diff)
downloadrust-a6bf81bbf71de4af70a97ad6d4fdc974e1d0e0ce.tar.gz
rust-a6bf81bbf71de4af70a97ad6d4fdc974e1d0e0ce.zip
suggestion from review move no run option in run_test call
-rw-r--r--src/librustdoc/doctest.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/librustdoc/doctest.rs b/src/librustdoc/doctest.rs
index eded40916b5..6c776be58eb 100644
--- a/src/librustdoc/doctest.rs
+++ b/src/librustdoc/doctest.rs
@@ -291,7 +291,7 @@ fn run_test(
     for debugging_option_str in &options.debugging_opts_strs {
         compiler.arg("-Z").arg(&debugging_option_str);
     }
-    if (no_run || options.no_run) && !compile_fail {
+    if no_run && !compile_fail {
         compiler.arg("--emit=metadata");
     }
     compiler.arg("--target").arg(match target {
@@ -361,7 +361,7 @@ fn run_test(
         }
     }
 
-    if no_run || options.no_run {
+    if no_run {
         return Ok(());
     }
 
@@ -852,7 +852,7 @@ impl Tester for Collector {
                     line,
                     options,
                     config.should_panic,
-                    config.no_run,
+                    config.no_run || options.no_run,
                     config.test_harness,
                     runtool,
                     runtool_args,