Apply suggestions from code review

Co-authored-by: Joshua Nelson <joshua@yottadb.com>
This commit is contained in:
Aliénore Bouttefeux 2021-05-01 11:46:00 +02:00 committed by Aliénore Bouttefeux
parent 3273d2f719
commit 03c710bf89
3 changed files with 3 additions and 2 deletions

View file

@ -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);
}

View file

@ -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() {}

View file

@ -1,2 +1,2 @@
error: option --no-run should be used with --test
error: the `--test` flag must be passed to enable `--no-run`