diff options
| -rw-r--r-- | src/librustdoc/config.rs | 2 | ||||
| -rw-r--r-- | src/test/rustdoc-ui/no-run-flag-error.rs | 1 | ||||
| -rw-r--r-- | src/test/rustdoc-ui/no-run-flag-error.stderr | 2 |
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` |
