Work around #96304 by ignoring one test case
This commit is contained in:
parent
4d747128eb
commit
575fc72350
2 changed files with 42 additions and 43 deletions
|
@ -55,11 +55,12 @@ fn main() {
|
|||
asm!("{}", const 0i32);
|
||||
asm!("{}", const 0i128);
|
||||
asm!("{}", const 0f32);
|
||||
//~^ ERROR mismatched types
|
||||
//~^ ERROR invalid type for `const` operand
|
||||
asm!("{}", const 0 as *mut u8);
|
||||
//~^ ERROR mismatched types
|
||||
asm!("{}", const &0);
|
||||
//~^ ERROR mismatched types
|
||||
//~^ ERROR invalid type for `const` operand
|
||||
|
||||
// FIXME: Currently ICEs due to #96304
|
||||
//asm!("{}", const &0);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -73,6 +74,6 @@ global_asm!("{}", const 0);
|
|||
global_asm!("{}", const 0i32);
|
||||
global_asm!("{}", const 0i128);
|
||||
global_asm!("{}", const 0f32);
|
||||
//~^ ERROR mismatched types
|
||||
//~^ ERROR invalid type for `const` operand
|
||||
global_asm!("{}", const 0 as *mut u8);
|
||||
//~^ ERROR mismatched types
|
||||
//~^ ERROR invalid type for `const` operand
|
||||
|
|
|
@ -39,6 +39,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
|
||||
|
|
||||
|
@ -102,49 +122,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`
|
||||
| ^^^^^^----
|
||||
| |
|
||||
| is an `f32`
|
||||
|
|
||||
= help: `const` operands must be of an integer type
|
||||
|
||||
error[E0308]: mismatched types
|
||||
--> $DIR/type-check-1.rs:59:26
|
||||
error: invalid type for `const` operand
|
||||
--> $DIR/type-check-1.rs:59:20
|
||||
|
|
||||
LL | asm!("{}", const 0 as *mut u8);
|
||||
| ^^^^^^^^^^^^ expected integer, found `*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[E0308]: mismatched types
|
||||
--> $DIR/type-check-1.rs:61:26
|
||||
|
|
||||
LL | asm!("{}", const &0);
|
||||
| ^^ expected integer, found `&{integer}`
|
||||
|
|
||||
help: consider removing the borrow
|
||||
|
|
||||
LL - asm!("{}", const &0);
|
||||
LL + asm!("{}", const 0);
|
||||
|
|
||||
error: aborting due to 16 previous errors
|
||||
|
||||
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`
|
||||
|
|
||||
= note: expected type `{integer}`
|
||||
found raw pointer `*mut u8`
|
||||
|
||||
error: aborting due to 17 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`.
|
||||
|
|
Loading…
Add table
Reference in a new issue