From a6bf81bbf71de4af70a97ad6d4fdc974e1d0e0ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ali=C3=A9nore=20Bouttefeux?= Date: Mon, 5 Apr 2021 17:59:57 +0200 Subject: [PATCH] suggestion from review move no run option in run_test call --- src/librustdoc/doctest.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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,