Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit a6bf81b

Browse files
committed
suggestion from review move no run option in run_test call
1 parent 0f3efe2 commit a6bf81b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/librustdoc/doctest.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ fn run_test(
291291
for debugging_option_str in &options.debugging_opts_strs {
292292
compiler.arg("-Z").arg(&debugging_option_str);
293293
}
294-
if (no_run || options.no_run) && !compile_fail {
294+
if no_run && !compile_fail {
295295
compiler.arg("--emit=metadata");
296296
}
297297
compiler.arg("--target").arg(match target {
@@ -361,7 +361,7 @@ fn run_test(
361361
}
362362
}
363363

364-
if no_run || options.no_run {
364+
if no_run {
365365
return Ok(());
366366
}
367367

@@ -852,7 +852,7 @@ impl Tester for Collector {
852852
line,
853853
options,
854854
config.should_panic,
855-
config.no_run,
855+
config.no_run || options.no_run,
856856
config.test_harness,
857857
runtool,
858858
runtool_args,

0 commit comments

Comments
 (0)