@@ -33,6 +33,26 @@ LL | asm!("{}", sym x);
33
33
|
34
34
= help: `sym` operands must refer to either a function or a static
35
35
36
+ error: invalid type for `const` operand
37
+ --> $DIR/type-check-1.rs:76:19
38
+ |
39
+ LL | global_asm!("{}", const 0f32);
40
+ | ^^^^^^----
41
+ | |
42
+ | is an `f32`
43
+ |
44
+ = help: `const` operands must be of an integer type
45
+
46
+ error: invalid type for `const` operand
47
+ --> $DIR/type-check-1.rs:78:19
48
+ |
49
+ LL | global_asm!("{}", const 0 as *mut u8);
50
+ | ^^^^^^------------
51
+ | |
52
+ | is a `*mut u8`
53
+ |
54
+ = help: `const` operands must be of an integer type
55
+
36
56
error: invalid asm output
37
57
--> $DIR/type-check-1.rs:14:29
38
58
|
@@ -96,49 +116,27 @@ LL | asm!("{}", inout(reg) v[..]);
96
116
|
97
117
= note: only integers, floats, SIMD vectors, pointers and function pointers can be used as arguments for inline assembly
98
118
99
- error[E0308]: mismatched types
100
- --> $DIR/type-check-1.rs:57:26
119
+ error: invalid type for `const` operand
120
+ --> $DIR/type-check-1.rs:57:20
101
121
|
102
122
LL | asm!("{}", const 0f32);
103
- | ^^^^ expected integer, found `f32`
104
-
105
- error[E0308]: mismatched types
106
- --> $DIR/type-check-1.rs:59:26
107
- |
108
- LL | asm!("{}", const 0 as *mut u8);
109
- | ^^^^^^^^^^^^ expected integer, found `*mut u8`
123
+ | ^^^^^^----
124
+ | |
125
+ | is an `f32`
110
126
|
111
- = note: expected type `{integer}`
112
- found raw pointer `*mut u8`
127
+ = help: `const` operands must be of an integer type
113
128
114
- error[E0308]: mismatched types
115
- --> $DIR/type-check-1.rs:61:26
129
+ error: invalid type for `const` operand
130
+ --> $DIR/type-check-1.rs:59:20
116
131
|
117
- LL | asm!("{}", const &0);
118
- | ^^ expected integer, found `&{integer}`
119
- |
120
- help: consider removing the borrow
121
- |
122
- LL - asm!("{}", const &0);
123
- LL + asm!("{}", const 0);
124
- |
125
-
126
- error[E0308]: mismatched types
127
- --> $DIR/type-check-1.rs:75:25
128
- |
129
- LL | global_asm!("{}", const 0f32);
130
- | ^^^^ expected integer, found `f32`
131
-
132
- error[E0308]: mismatched types
133
- --> $DIR/type-check-1.rs:77:25
134
- |
135
- LL | global_asm!("{}", const 0 as *mut u8);
136
- | ^^^^^^^^^^^^ expected integer, found `*mut u8`
132
+ LL | asm!("{}", const 0 as *mut u8);
133
+ | ^^^^^^------------
134
+ | |
135
+ | is a `*mut u8`
137
136
|
138
- = note: expected type `{integer}`
139
- found raw pointer `*mut u8`
137
+ = help: `const` operands must be of an integer type
140
138
141
- error: aborting due to 17 previous errors
139
+ error: aborting due to 16 previous errors
142
140
143
- Some errors have detailed explanations: E0277, E0308, E0435.
141
+ Some errors have detailed explanations: E0277, E0435.
144
142
For more information about an error, try `rustc --explain E0277`.
0 commit comments