diff options
| author | Camelid <camelidcamel@gmail.com> | 2020-06-14 13:38:09 -0700 |
|---|---|---|
| committer | Camelid <camelidcamel@gmail.com> | 2020-06-20 11:12:42 -0700 |
| commit | b94b7e7f1bf4e05d28ec7fca305c1d49f242c3dd (patch) | |
| tree | d7071eb097ef386680a8a9c235d35137cb4f67a6 /src/test/ui | |
| parent | 7aaadb69e45134277e6091ec1ce173c0787cf896 (diff) | |
| download | rust-b94b7e7f1bf4e05d28ec7fca305c1d49f242c3dd.tar.gz rust-b94b7e7f1bf4e05d28ec7fca305c1d49f242c3dd.zip | |
Make warning an error; use help instead of suggestion; clean up code
For some reason, the help message is now in a separate message, which adds a lot of noise. I would like to try to get it back to one message.
Diffstat (limited to 'src/test/ui')
| -rw-r--r-- | src/test/ui/asm/duplicate-options.rs | 19 | ||||
| -rw-r--r-- | src/test/ui/asm/duplicate-options.stderr | 72 |
2 files changed, 66 insertions, 25 deletions
diff --git a/src/test/ui/asm/duplicate-options.rs b/src/test/ui/asm/duplicate-options.rs index 9c447451511..e412932fa7e 100644 --- a/src/test/ui/asm/duplicate-options.rs +++ b/src/test/ui/asm/duplicate-options.rs @@ -1,19 +1,24 @@ // only-x86_64 -// build-pass #![feature(asm)] fn main() { unsafe { asm!("", options(nomem, nomem)); - //~^ WARNING the `nomem` option was already provided + //~^ ERROR the `nomem` option was already provided + //~| HELP remove this option asm!("", options(att_syntax, att_syntax)); - //~^ WARNING the `att_syntax` option was already provided + //~^ ERROR the `att_syntax` option was already provided + //~| HELP remove this option asm!("", options(nostack, att_syntax), options(nostack)); - //~^ WARNING the `nostack` option was already provided + //~^ ERROR the `nostack` option was already provided + //~| HELP remove this option asm!("", options(nostack, nostack), options(nostack), options(nostack)); - //~^ WARNING the `nostack` option was already provided - //~| WARNING the `nostack` option was already provided - //~| WARNING the `nostack` option was already provided + //~^ ERROR the `nostack` option was already provided + //~| HELP remove this option + //~| ERROR the `nostack` option was already provided + //~| HELP remove this option + //~| ERROR the `nostack` option was already provided + //~| HELP remove this option } } diff --git a/src/test/ui/asm/duplicate-options.stderr b/src/test/ui/asm/duplicate-options.stderr index 113aca8da90..accfdef474b 100644 --- a/src/test/ui/asm/duplicate-options.stderr +++ b/src/test/ui/asm/duplicate-options.stderr @@ -1,38 +1,74 @@ -warning: the `nomem` option was already provided - --> $DIR/duplicate-options.rs:8:33 +error: the `nomem` option was already provided + --> $DIR/duplicate-options.rs:7:33 | LL | asm!("", options(nomem, nomem)); - | ^^^^^ help: remove this option + | ^^^^^ + | +help: remove this option + --> $DIR/duplicate-options.rs:7:33 + | +LL | asm!("", options(nomem, nomem)); + | ^^^^^ -warning: the `att_syntax` option was already provided +error: the `att_syntax` option was already provided + --> $DIR/duplicate-options.rs:10:38 + | +LL | asm!("", options(att_syntax, att_syntax)); + | ^^^^^^^^^^ + | +help: remove this option --> $DIR/duplicate-options.rs:10:38 | LL | asm!("", options(att_syntax, att_syntax)); - | ^^^^^^^^^^ help: remove this option + | ^^^^^^^^^^ -warning: the `nostack` option was already provided - --> $DIR/duplicate-options.rs:12:56 +error: the `nostack` option was already provided + --> $DIR/duplicate-options.rs:13:56 + | +LL | asm!("", options(nostack, att_syntax), options(nostack)); + | ^^^^^^^ + | +help: remove this option + --> $DIR/duplicate-options.rs:13:56 | LL | asm!("", options(nostack, att_syntax), options(nostack)); - | ^^^^^^^ help: remove this option + | ^^^^^^^ -warning: the `nostack` option was already provided - --> $DIR/duplicate-options.rs:14:35 +error: the `nostack` option was already provided + --> $DIR/duplicate-options.rs:16:35 | LL | asm!("", options(nostack, nostack), options(nostack), options(nostack)); - | ^^^^^^^ help: remove this option + | ^^^^^^^ + | +help: remove this option + --> $DIR/duplicate-options.rs:16:35 + | +LL | asm!("", options(nostack, nostack), options(nostack), options(nostack)); + | ^^^^^^^ -warning: the `nostack` option was already provided - --> $DIR/duplicate-options.rs:14:53 +error: the `nostack` option was already provided + --> $DIR/duplicate-options.rs:16:53 | LL | asm!("", options(nostack, nostack), options(nostack), options(nostack)); - | ^^^^^^^ help: remove this option + | ^^^^^^^ + | +help: remove this option + --> $DIR/duplicate-options.rs:16:53 + | +LL | asm!("", options(nostack, nostack), options(nostack), options(nostack)); + | ^^^^^^^ -warning: the `nostack` option was already provided - --> $DIR/duplicate-options.rs:14:71 +error: the `nostack` option was already provided + --> $DIR/duplicate-options.rs:16:71 + | +LL | asm!("", options(nostack, nostack), options(nostack), options(nostack)); + | ^^^^^^^ + | +help: remove this option + --> $DIR/duplicate-options.rs:16:71 | LL | asm!("", options(nostack, nostack), options(nostack), options(nostack)); - | ^^^^^^^ help: remove this option + | ^^^^^^^ -warning: 6 warnings emitted +error: aborting due to 6 previous errors |
