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