@@ -35,55 +35,35 @@ LL + const x: /* Type */ = 0;
35
35
|
36
36
37
37
error: invalid type for `const` operand
38
- --> $DIR/invalid-const-operand.rs:12 :19
38
+ --> $DIR/invalid-const-operand.rs:14 :19
39
39
|
40
40
LL | global_asm!("{}", const 0f32);
41
41
| ^^^^^^----
42
42
| |
43
43
| is an `f32`
44
44
|
45
- = help: `const` operands must be of an integer type
46
-
47
- error: invalid type for `const` operand
48
- --> $DIR/invalid-const-operand.rs:14:19
49
- |
50
- LL | global_asm!("{}", const 0 as *mut u8);
51
- | ^^^^^^------------
52
- | |
53
- | is a `*mut u8`
54
- |
55
- = help: `const` operands must be of an integer type
45
+ = help: `const` operands must be of an integer or thin pointer type
56
46
57
47
error: invalid type for `const` operand
58
- --> $DIR/invalid-const-operand.rs:24 :20
48
+ --> $DIR/invalid-const-operand.rs:25 :20
59
49
|
60
50
LL | asm!("{}", const 0f32);
61
51
| ^^^^^^----
62
52
| |
63
53
| is an `f32`
64
54
|
65
- = help: `const` operands must be of an integer type
66
-
67
- error: invalid type for `const` operand
68
- --> $DIR/invalid-const-operand.rs:26:20
69
- |
70
- LL | asm!("{}", const 0 as *mut u8);
71
- | ^^^^^^------------
72
- | |
73
- | is a `*mut u8`
74
- |
75
- = help: `const` operands must be of an integer type
55
+ = help: `const` operands must be of an integer or thin pointer type
76
56
77
57
error: invalid type for `const` operand
78
58
--> $DIR/invalid-const-operand.rs:28:20
79
59
|
80
- LL | asm!("{}", const &0 );
81
- | ^^^^^^--
60
+ LL | asm!("{}", const b"Foo".as_slice() );
61
+ | ^^^^^^-----------------
82
62
| |
83
- | is a `&i32 `
63
+ | is a `&[u8] `
84
64
|
85
- = help: `const` operands must be of an integer type
65
+ = help: `const` operands must be of an integer or thin pointer type
86
66
87
- error: aborting due to 8 previous errors
67
+ error: aborting due to 6 previous errors
88
68
89
69
For more information about this error, try `rustc --explain E0435`.
0 commit comments