about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAliƩnore Bouttefeux <77335613+ABouttefeux@users.noreply.github.com>2021-05-01 11:46:00 +0200
committerAliƩnore Bouttefeux <alienore.bouttefeux@gmail.com>2021-05-01 11:54:57 +0200
commit03c710bf8923057ae2050f4300527ff922a2f081 (patch)
treeed6ca81b2b81b8eb4cbf222da8072a6780afa1ab
parent3273d2f7199ed8e678c249ddbdbac78244968901 (diff)
Apply suggestions from code review
Co-authored-by: Joshua Nelson <joshua@yottadb.com>
-rw-r--r--src/librustdoc/config.rs2
-rw-r--r--src/test/rustdoc-ui/no-run-flag-error.rs1
-rw-r--r--src/test/rustdoc-ui/no-run-flag-error.stderr2
3 files changed, 3 insertions, 2 deletions
diff --git a/src/librustdoc/config.rs b/src/librustdoc/config.rs
index 76aa785636d..053529393d5 100644
--- a/src/librustdoc/config.rs
+++ b/src/librustdoc/config.rs
@@ -462,7 +462,7 @@ impl Options {
         let no_run = matches.opt_present("no-run");
 
         if !should_test && no_run {
-            diag.struct_err("option --no-run should be used with --test").emit();
+            diag.err("the `--test` flag must be passed to enable `--no-run`");
             return Err(1);
         }
 
diff --git a/src/test/rustdoc-ui/no-run-flag-error.rs b/src/test/rustdoc-ui/no-run-flag-error.rs
index a42b5a9d684..4ead621482b 100644
--- a/src/test/rustdoc-ui/no-run-flag-error.rs
+++ b/src/test/rustdoc-ui/no-run-flag-error.rs
@@ -1,5 +1,6 @@
 // test the behavior of the --no-run flag without the --test flag
 
 // compile-flags:-Z unstable-options --no-run --test-args=--test-threads=1
+// error-pattern: the `--test` flag must be passed
 
 pub fn f() {}
diff --git a/src/test/rustdoc-ui/no-run-flag-error.stderr b/src/test/rustdoc-ui/no-run-flag-error.stderr
index 3d34be8a420..d032646c365 100644
--- a/src/test/rustdoc-ui/no-run-flag-error.stderr
+++ b/src/test/rustdoc-ui/no-run-flag-error.stderr
@@ -1,2 +1,2 @@
-error: option --no-run should be used with --test
+error: the `--test` flag must be passed to enable `--no-run`