Skip to content

Commit

Permalink
Work around #96304 by ignoring one test case
Browse files Browse the repository at this point in the history
  • Loading branch information
Amanieu committed Jun 11, 2024
1 parent 03c307a commit d61ff43
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 39 deletions.
5 changes: 3 additions & 2 deletions tests/ui/asm/type-check-1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,9 @@ fn main() {
//~^ ERROR mismatched types
asm!("{}", const 0 as *mut u8);
//~^ ERROR mismatched types
asm!("{}", const &0);
//~^ ERROR mismatched types

Check failure on line 61 in tests/ui/asm/type-check-1.rs

View workflow job for this annotation

GitHub Actions / PR - mingw-check-tidy

trailing whitespace
// FIXME: Currently ICEs due to #96304
//asm!("{}", const &0);
}
}

Expand Down
72 changes: 35 additions & 37 deletions tests/ui/asm/type-check-1.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,26 @@ LL | asm!("{}", sym x);
|
= help: `sym` operands must refer to either a function or a static

error: invalid type for `const` operand
--> $DIR/type-check-1.rs:76:19
|
LL | global_asm!("{}", const 0f32);
| ^^^^^^----
| |
| is an `f32`
|
= help: `const` operands must be of an integer type

error: invalid type for `const` operand
--> $DIR/type-check-1.rs:78:19
|
LL | global_asm!("{}", const 0 as *mut u8);
| ^^^^^^------------
| |
| is a `*mut u8`
|
= help: `const` operands must be of an integer type

error: invalid asm output
--> $DIR/type-check-1.rs:14:29
|
Expand Down Expand Up @@ -96,49 +116,27 @@ LL | asm!("{}", inout(reg) v[..]);
|
= note: only integers, floats, SIMD vectors, pointers and function pointers can be used as arguments for inline assembly

error[E0308]: mismatched types
--> $DIR/type-check-1.rs:57:26
error: invalid type for `const` operand
--> $DIR/type-check-1.rs:57:20
|
LL | asm!("{}", const 0f32);
| ^^^^ expected integer, found `f32`

error[E0308]: mismatched types
--> $DIR/type-check-1.rs:59:26
|
LL | asm!("{}", const 0 as *mut u8);
| ^^^^^^^^^^^^ expected integer, found `*mut u8`
| ^^^^^^----
| |
| is an `f32`
|
= note: expected type `{integer}`
found raw pointer `*mut u8`
= help: `const` operands must be of an integer type

error[E0308]: mismatched types
--> $DIR/type-check-1.rs:61:26
error: invalid type for `const` operand
--> $DIR/type-check-1.rs:59:20
|
LL | asm!("{}", const &0);
| ^^ expected integer, found `&{integer}`
|
help: consider removing the borrow
|
LL - asm!("{}", const &0);
LL + asm!("{}", const 0);
|

error[E0308]: mismatched types
--> $DIR/type-check-1.rs:75:25
|
LL | global_asm!("{}", const 0f32);
| ^^^^ expected integer, found `f32`

error[E0308]: mismatched types
--> $DIR/type-check-1.rs:77:25
|
LL | global_asm!("{}", const 0 as *mut u8);
| ^^^^^^^^^^^^ expected integer, found `*mut u8`
LL | asm!("{}", const 0 as *mut u8);
| ^^^^^^------------
| |
| is a `*mut u8`
|
= note: expected type `{integer}`
found raw pointer `*mut u8`
= help: `const` operands must be of an integer type

error: aborting due to 17 previous errors
error: aborting due to 16 previous errors

Some errors have detailed explanations: E0277, E0308, E0435.
Some errors have detailed explanations: E0277, E0435.
For more information about an error, try `rustc --explain E0277`.

0 comments on commit d61ff43

Please sign in to comment.