
``` error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields --> $DIR/attempted-access-non-fatal.rs:7:15 | LL | let _ = 2.l; | ^ | help: if intended to be a floating point literal, consider adding a `0` after the period and a `f64` suffix | LL - let _ = 2.l; LL + let _ = 2.0f64; | ```
89 lines
2.5 KiB
Text
89 lines
2.5 KiB
Text
error[E0435]: attempt to use a non-constant value in a constant
|
|
--> $DIR/invalid-const-operand.rs:40:26
|
|
|
|
|
LL | asm!("{}", const x);
|
|
| ^ non-constant value
|
|
|
|
|
help: consider using `const` instead of `let`
|
|
|
|
|
LL - let x = 0;
|
|
LL + const x: /* Type */ = 0;
|
|
|
|
|
|
|
error[E0435]: attempt to use a non-constant value in a constant
|
|
--> $DIR/invalid-const-operand.rs:43:36
|
|
|
|
|
LL | asm!("{}", const const_foo(x));
|
|
| ^ non-constant value
|
|
|
|
|
help: consider using `const` instead of `let`
|
|
|
|
|
LL - let x = 0;
|
|
LL + const x: /* Type */ = 0;
|
|
|
|
|
|
|
error[E0435]: attempt to use a non-constant value in a constant
|
|
--> $DIR/invalid-const-operand.rs:46:36
|
|
|
|
|
LL | asm!("{}", const const_bar(x));
|
|
| ^ non-constant value
|
|
|
|
|
help: consider using `const` instead of `let`
|
|
|
|
|
LL - let x = 0;
|
|
LL + const x: /* Type */ = 0;
|
|
|
|
|
|
|
error: invalid type for `const` operand
|
|
--> $DIR/invalid-const-operand.rs:12: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/invalid-const-operand.rs:14:19
|
|
|
|
|
LL | global_asm!("{}", const 0 as *mut u8);
|
|
| ^^^^^^------------
|
|
| |
|
|
| is a `*mut u8`
|
|
|
|
|
= help: `const` operands must be of an integer type
|
|
|
|
error: invalid type for `const` operand
|
|
--> $DIR/invalid-const-operand.rs:24:20
|
|
|
|
|
LL | asm!("{}", const 0f32);
|
|
| ^^^^^^----
|
|
| |
|
|
| is an `f32`
|
|
|
|
|
= help: `const` operands must be of an integer type
|
|
|
|
error: invalid type for `const` operand
|
|
--> $DIR/invalid-const-operand.rs:26:20
|
|
|
|
|
LL | asm!("{}", const 0 as *mut u8);
|
|
| ^^^^^^------------
|
|
| |
|
|
| is a `*mut u8`
|
|
|
|
|
= help: `const` operands must be of an integer type
|
|
|
|
error: invalid type for `const` operand
|
|
--> $DIR/invalid-const-operand.rs:28:20
|
|
|
|
|
LL | asm!("{}", const &0);
|
|
| ^^^^^^--
|
|
| |
|
|
| is a `&i32`
|
|
|
|
|
= help: `const` operands must be of an integer type
|
|
|
|
error: aborting due to 8 previous errors
|
|
|
|
For more information about this error, try `rustc --explain E0435`.
|