diff --git a/src/librustdoc/doctest.rs b/src/librustdoc/doctest.rs index eded40916b52..6c776be58eb1 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,