File tree 2 files changed +13
-1
lines changed
2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -209,3 +209,9 @@ pub unsafe extern "C" fn allow_compile_error_and_asm(a: u32) -> u32 {
209
209
//~^ ERROR this is a user specified error
210
210
asm ! ( "" , options( noreturn) )
211
211
}
212
+
213
+ #[ naked]
214
+ pub unsafe extern "C" fn invalid_asm_syntax ( a : u32 ) -> u32 {
215
+ asm ! ( invalid_syntax)
216
+ //~^ ERROR asm template must be a string literal
217
+ }
Original file line number Diff line number Diff line change @@ -16,6 +16,12 @@ error: this is a user specified error
16
16
LL | compile_error!("this is a user specified error");
17
17
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
18
18
19
+ error: asm template must be a string literal
20
+ --> $DIR/naked-functions.rs:215:10
21
+ |
22
+ LL | asm!(invalid_syntax)
23
+ | ^^^^^^^^^^^^^^
24
+
19
25
error: patterns not allowed in naked function parameters
20
26
--> $DIR/naked-functions.rs:20:5
21
27
|
@@ -267,6 +273,6 @@ error: naked functions cannot be inlined
267
273
LL | #[inline(never)]
268
274
| ^^^^^^^^^^^^^^^^
269
275
270
- error: aborting due to 32 previous errors; 2 warnings emitted
276
+ error: aborting due to 33 previous errors; 2 warnings emitted
271
277
272
278
For more information about this error, try `rustc --explain E0787`.
You can’t perform that action at this time.
0 commit comments