11error: the `in` operand cannot be used with `naked_asm!`
2- --> $DIR/naked-functions.rs:53 :29
2+ --> $DIR/naked-functions.rs:47 :29
33 |
44LL | naked_asm!("/* {0} */", in(reg) a)
55 | ^^ the `in` operand is not meaningful for global-scoped inline assembly, remove it
66
77error: the `in` operand cannot be used with `naked_asm!`
8- --> $DIR/naked-functions.rs:74 :10
8+ --> $DIR/naked-functions.rs:68 :10
99 |
1010LL | in(reg) a,
1111 | ^^ the `in` operand is not meaningful for global-scoped inline assembly, remove it
1212
1313error: the `noreturn` option cannot be used with `naked_asm!`
14- --> $DIR/naked-functions.rs:94 :28
14+ --> $DIR/naked-functions.rs:88 :28
1515 |
1616LL | naked_asm!("", options(noreturn));
1717 | ^^^^^^^^ the `noreturn` option is not meaningful for global-scoped inline assembly
1818
1919error: the `nomem` option cannot be used with `naked_asm!`
20- --> $DIR/naked-functions.rs:111 :28
20+ --> $DIR/naked-functions.rs:105 :28
2121 |
2222LL | naked_asm!("", options(nomem, preserves_flags));
2323 | ^^^^^ the `nomem` option is not meaningful for global-scoped inline assembly
2424
2525error: the `preserves_flags` option cannot be used with `naked_asm!`
26- --> $DIR/naked-functions.rs:111 :35
26+ --> $DIR/naked-functions.rs:105 :35
2727 |
2828LL | naked_asm!("", options(nomem, preserves_flags));
2929 | ^^^^^^^^^^^^^^^ the `preserves_flags` option is not meaningful for global-scoped inline assembly
3030
3131error: the `readonly` option cannot be used with `naked_asm!`
32- --> $DIR/naked-functions.rs:118 :28
32+ --> $DIR/naked-functions.rs:112 :28
3333 |
3434LL | naked_asm!("", options(readonly, nostack), options(pure));
3535 | ^^^^^^^^ the `readonly` option is not meaningful for global-scoped inline assembly
3636
3737error: the `nostack` option cannot be used with `naked_asm!`
38- --> $DIR/naked-functions.rs:118 :38
38+ --> $DIR/naked-functions.rs:112 :38
3939 |
4040LL | naked_asm!("", options(readonly, nostack), options(pure));
4141 | ^^^^^^^ the `nostack` option is not meaningful for global-scoped inline assembly
4242
4343error: the `pure` option cannot be used with `naked_asm!`
44- --> $DIR/naked-functions.rs:118 :56
44+ --> $DIR/naked-functions.rs:112 :56
4545 |
4646LL | naked_asm!("", options(readonly, nostack), options(pure));
4747 | ^^^^ the `pure` option is not meaningful for global-scoped inline assembly
4848
4949error: the `may_unwind` option cannot be used with `naked_asm!`
50- --> $DIR/naked-functions.rs:126 :28
50+ --> $DIR/naked-functions.rs:120 :28
5151 |
5252LL | naked_asm!("", options(may_unwind));
5353 | ^^^^^^^^^^ the `may_unwind` option is not meaningful for global-scoped inline assembly
5454
5555error: this is a user specified error
56- --> $DIR/naked-functions.rs:157 :5
56+ --> $DIR/naked-functions.rs:151 :5
5757 |
5858LL | compile_error!("this is a user specified error")
5959 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
6060
6161error: this is a user specified error
62- --> $DIR/naked-functions.rs:163 :5
62+ --> $DIR/naked-functions.rs:157 :5
6363 |
6464LL | compile_error!("this is a user specified error");
6565 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
6666
6767error: asm template must be a string literal
68- --> $DIR/naked-functions.rs:170 :16
68+ --> $DIR/naked-functions.rs:164 :16
6969 |
7070LL | naked_asm!(invalid_syntax)
7171 | ^^^^^^^^^^^^^^
@@ -76,46 +76,40 @@ error[E0787]: the `asm!` macro is not allowed in naked functions
7676LL | unsafe { asm!("", options(raw)) };
7777 | ^^^^^^^^^^^^^^^^^^^^^^ consider using the `naked_asm!` macro instead
7878
79- error[E0787]: naked functions must contain a single `naked_asm!` invocation
80- --> $DIR/naked-functions.rs:18:1
81- |
82- LL | pub extern "C" fn global_asm_macro() {
83- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
84-
8579error: patterns not allowed in naked function parameters
86- --> $DIR/naked-functions.rs:31 :5
80+ --> $DIR/naked-functions.rs:25 :5
8781 |
8882LL | mut a: u32,
8983 | ^^^^^
9084
9185error: patterns not allowed in naked function parameters
92- --> $DIR/naked-functions.rs:33 :5
86+ --> $DIR/naked-functions.rs:27 :5
9387 |
9488LL | &b: &i32,
9589 | ^^
9690
9791error: patterns not allowed in naked function parameters
98- --> $DIR/naked-functions.rs:35 :6
92+ --> $DIR/naked-functions.rs:29 :6
9993 |
10094LL | (None | Some(_)): Option<std::ptr::NonNull<u8>>,
10195 | ^^^^^^^^^^^^^^
10296
10397error: patterns not allowed in naked function parameters
104- --> $DIR/naked-functions.rs:37 :5
98+ --> $DIR/naked-functions.rs:31 :5
10599 |
106100LL | P { x, y }: P,
107101 | ^^^^^^^^^^
108102
109103error: referencing function parameters is not allowed in naked functions
110- --> $DIR/naked-functions.rs:46 :5
104+ --> $DIR/naked-functions.rs:40 :5
111105 |
112106LL | a + 1
113107 | ^
114108 |
115109 = help: follow the calling convention in asm block to use parameters
116110
117111error[E0787]: naked functions must contain a single `naked_asm!` invocation
118- --> $DIR/naked-functions.rs:44 :1
112+ --> $DIR/naked-functions.rs:38 :1
119113 |
120114LL | pub extern "C" fn inc(a: u32) -> u32 {
121115 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -124,7 +118,7 @@ LL | a + 1
124118 | ----- not allowed in naked functions
125119
126120error[E0787]: naked functions must contain a single `naked_asm!` invocation
127- --> $DIR/naked-functions.rs:58 :1
121+ --> $DIR/naked-functions.rs:52 :1
128122 |
129123LL | pub extern "C" fn inc_closure(a: u32) -> u32 {
130124 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -133,7 +127,7 @@ LL | (|| a + 1)()
133127 | ------------ not allowed in naked functions
134128
135129error[E0787]: naked functions must contain a single `naked_asm!` invocation
136- --> $DIR/naked-functions.rs:64 :1
130+ --> $DIR/naked-functions.rs:58 :1
137131 |
138132LL | pub extern "C" fn unsupported_operands() {
139133 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -150,13 +144,13 @@ LL | let mut e = 0usize;
150144 | ------------------- not allowed in naked functions
151145
152146error[E0787]: naked functions must contain a single `naked_asm!` invocation
153- --> $DIR/naked-functions.rs:86 :1
147+ --> $DIR/naked-functions.rs:80 :1
154148 |
155149LL | pub extern "C" fn missing_assembly() {
156150 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
157151
158152error[E0787]: naked functions must contain a single `naked_asm!` invocation
159- --> $DIR/naked-functions.rs:91 :1
153+ --> $DIR/naked-functions.rs:85 :1
160154 |
161155LL | pub extern "C" fn too_many_asm_blocks() {
162156 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -165,22 +159,22 @@ LL | naked_asm!("");
165159 | -------------- multiple `naked_asm!` invocations are not allowed in naked functions
166160
167161error: referencing function parameters is not allowed in naked functions
168- --> $DIR/naked-functions.rs:103 :11
162+ --> $DIR/naked-functions.rs:97 :11
169163 |
170164LL | *&y
171165 | ^
172166 |
173167 = help: follow the calling convention in asm block to use parameters
174168
175169error[E0787]: naked functions must contain a single `naked_asm!` invocation
176- --> $DIR/naked-functions.rs:101 :5
170+ --> $DIR/naked-functions.rs:95 :5
177171 |
178172LL | pub extern "C" fn inner(y: usize) -> usize {
179173 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
180174LL |
181175LL | *&y
182176 | --- not allowed in naked functions
183177
184- error: aborting due to 26 previous errors
178+ error: aborting due to 25 previous errors
185179
186180For more information about this error, try `rustc --explain E0787`.
0 commit comments