Skip to content

Commit 03c710b

Browse files
ABouttefeuxJoshua Nelson
and
Joshua Nelson
committed
Apply suggestions from code review
Co-authored-by: Joshua Nelson <joshua@yottadb.com>
1 parent 3273d2f commit 03c710b

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

src/librustdoc/config.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,7 @@ impl Options {
462462
let no_run = matches.opt_present("no-run");
463463

464464
if !should_test && no_run {
465-
diag.struct_err("option --no-run should be used with --test").emit();
465+
diag.err("the `--test` flag must be passed to enable `--no-run`");
466466
return Err(1);
467467
}
468468

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// test the behavior of the --no-run flag without the --test flag
22

33
// compile-flags:-Z unstable-options --no-run --test-args=--test-threads=1
4+
// error-pattern: the `--test` flag must be passed
45

56
pub fn f() {}
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
error: option --no-run should be used with --test
1+
error: the `--test` flag must be passed to enable `--no-run`
22

0 commit comments

Comments
 (0)