diff options
| author | Amanieu d'Antras <amanieu@gmail.com> | 2020-03-19 07:41:43 +0000 |
|---|---|---|
| committer | Amanieu d'Antras <amanieu@gmail.com> | 2020-05-18 14:41:32 +0100 |
| commit | ff97db1e54dde5418f55f1c727e1c37257c4a6ab (patch) | |
| tree | 5680cda70cd21c2d6b1f17bbf80a261e618fe67a /src/test | |
| parent | 8ab0f2d3c5a85563b98c4896116e3d53154fff9c (diff) | |
| download | rust-ff97db1e54dde5418f55f1c727e1c37257c4a6ab.tar.gz rust-ff97db1e54dde5418f55f1c727e1c37257c4a6ab.zip | |
Apply review feedback
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/ui/asm/parse-error.rs | 5 | ||||
| -rw-r--r-- | src/test/ui/asm/parse-error.stderr | 34 | ||||
| -rw-r--r-- | src/test/ui/asm/type-check-3.stderr | 12 |
3 files changed, 33 insertions, 18 deletions
diff --git a/src/test/ui/asm/parse-error.rs b/src/test/ui/asm/parse-error.rs index e6566866b22..2b1f018f364 100644 --- a/src/test/ui/asm/parse-error.rs +++ b/src/test/ui/asm/parse-error.rs @@ -35,7 +35,10 @@ fn main() { asm!("", options(nomem, foo)); //~^ ERROR expected one of asm!("", options(), options()); - //~^ ERROR asm options cannot be specified twice + //~^ ERROR asm options cannot be specified multiple times + asm!("", options(), options(), options()); + //~^ ERROR asm options cannot be specified multiple times + //~^^ ERROR asm options cannot be specified multiple times asm!("{}", options(), const foo); //~^ ERROR arguments are not allowed after options asm!("{a}", a = const foo, a = const bar); diff --git a/src/test/ui/asm/parse-error.stderr b/src/test/ui/asm/parse-error.stderr index a927ce13858..94eb9d29862 100644 --- a/src/test/ui/asm/parse-error.stderr +++ b/src/test/ui/asm/parse-error.stderr @@ -82,7 +82,7 @@ error: expected one of `)`, `nomem`, `noreturn`, `nostack`, `preserves_flags`, ` LL | asm!("", options(nomem, foo)); | ^^^ expected one of 7 possible tokens -error: asm options cannot be specified twice +error: asm options cannot be specified multiple times --> $DIR/parse-error.rs:37:29 | LL | asm!("", options(), options()); @@ -90,8 +90,24 @@ LL | asm!("", options(), options()); | | | previously here +error: asm options cannot be specified multiple times + --> $DIR/parse-error.rs:39:29 + | +LL | asm!("", options(), options(), options()); + | --------- ^^^^^^^^^ duplicate options + | | + | previously here + +error: asm options cannot be specified multiple times + --> $DIR/parse-error.rs:39:40 + | +LL | asm!("", options(), options(), options()); + | --------- ^^^^^^^^^ duplicate options + | | + | previously here + error: arguments are not allowed after options - --> $DIR/parse-error.rs:39:31 + --> $DIR/parse-error.rs:42:31 | LL | asm!("{}", options(), const foo); | --------- ^^^^^^^^^ argument @@ -99,7 +115,7 @@ LL | asm!("{}", options(), const foo); | previous options error: duplicate argument named `a` - --> $DIR/parse-error.rs:41:36 + --> $DIR/parse-error.rs:44:36 | LL | asm!("{a}", a = const foo, a = const bar); | ------------- ^^^^^^^^^^^^^ duplicate argument @@ -107,19 +123,19 @@ LL | asm!("{a}", a = const foo, a = const bar); | previously here error: argument never used - --> $DIR/parse-error.rs:41:36 + --> $DIR/parse-error.rs:44:36 | LL | asm!("{a}", a = const foo, a = const bar); | ^^^^^^^^^^^^^ argument never used error: explicit register arguments cannot have names - --> $DIR/parse-error.rs:44:18 + --> $DIR/parse-error.rs:47:18 | LL | asm!("", a = in("eax") foo); | ^^^^^^^^^^^^^^^^^ error: named arguments cannot follow explicit register arguments - --> $DIR/parse-error.rs:46:36 + --> $DIR/parse-error.rs:49:36 | LL | asm!("{a}", in("eax") foo, a = const bar); | ------------- ^^^^^^^^^^^^^ named argument @@ -127,7 +143,7 @@ LL | asm!("{a}", in("eax") foo, a = const bar); | explicit register argument error: named arguments cannot follow explicit register arguments - --> $DIR/parse-error.rs:48:36 + --> $DIR/parse-error.rs:51:36 | LL | asm!("{a}", in("eax") foo, a = const bar); | ------------- ^^^^^^^^^^^^^ named argument @@ -135,12 +151,12 @@ LL | asm!("{a}", in("eax") foo, a = const bar); | explicit register argument error: positional arguments cannot follow named arguments or explicit register arguments - --> $DIR/parse-error.rs:50:36 + --> $DIR/parse-error.rs:53:36 | LL | asm!("{1}", in("eax") foo, const bar); | ------------- ^^^^^^^^^ positional argument | | | explicit register argument -error: aborting due to 22 previous errors +error: aborting due to 24 previous errors diff --git a/src/test/ui/asm/type-check-3.stderr b/src/test/ui/asm/type-check-3.stderr index e4018ca1d42..ccc795d1013 100644 --- a/src/test/ui/asm/type-check-3.stderr +++ b/src/test/ui/asm/type-check-3.stderr @@ -83,8 +83,7 @@ LL | asm!("{:r}", inout(reg) 0u16 => val_i8); | | | type `u16` | - = note: asm inout arguments must have the same type - = note: unless they are both pointers or integers of the same size + = note: asm inout arguments must have the same type, unless they are both pointers or integers of the same size error: incompatible types for asm inout argument --> $DIR/type-check-3.rs:59:33 @@ -94,8 +93,7 @@ LL | asm!("{:r}", inout(reg) 0u32 => val_f32); | | | type `u32` | - = note: asm inout arguments must have the same type - = note: unless they are both pointers or integers of the same size + = note: asm inout arguments must have the same type, unless they are both pointers or integers of the same size error: incompatible types for asm inout argument --> $DIR/type-check-3.rs:61:33 @@ -105,8 +103,7 @@ LL | asm!("{:r}", inout(reg) 0u32 => val_ptr); | | | type `u32` | - = note: asm inout arguments must have the same type - = note: unless they are both pointers or integers of the same size + = note: asm inout arguments must have the same type, unless they are both pointers or integers of the same size error: incompatible types for asm inout argument --> $DIR/type-check-3.rs:63:33 @@ -116,8 +113,7 @@ LL | asm!("{:r}", inout(reg) main => val_u32); | | | type `fn()` | - = note: asm inout arguments must have the same type - = note: unless they are both pointers or integers of the same size + = note: asm inout arguments must have the same type, unless they are both pointers or integers of the same size error: aborting due to 9 previous errors; 4 warnings emitted |
