]> git.lizzy.rs Git - rust.git/blob - src/test/ui/asm/naked-functions.stderr
Merge commit '57b3c4b90f4346b3990c1be387c3b3ca7b78412c' into clippyup
[rust.git] / src / test / ui / asm / naked-functions.stderr
1 error: asm with the `pure` option must have at least one output
2   --> $DIR/naked-functions.rs:111:14
3    |
4 LL |     asm!("", options(readonly, nostack), options(pure));
5    |              ^^^^^^^^^^^^^^^^^^^^^^^^^^  ^^^^^^^^^^^^^
6
7 error: patterns not allowed in naked function parameters
8   --> $DIR/naked-functions.rs:21:5
9    |
10 LL |     mut a: u32,
11    |     ^^^^^
12
13 error: patterns not allowed in naked function parameters
14   --> $DIR/naked-functions.rs:23:5
15    |
16 LL |     &b: &i32,
17    |     ^^
18
19 error: patterns not allowed in naked function parameters
20   --> $DIR/naked-functions.rs:25:6
21    |
22 LL |     (None | Some(_)): Option<std::ptr::NonNull<u8>>,
23    |      ^^^^^^^^^^^^^^
24
25 error: patterns not allowed in naked function parameters
26   --> $DIR/naked-functions.rs:27:5
27    |
28 LL |     P { x, y }: P,
29    |     ^^^^^^^^^^
30
31 error: referencing function parameters is not allowed in naked functions
32   --> $DIR/naked-functions.rs:36:5
33    |
34 LL |     a + 1
35    |     ^
36    |
37    = help: follow the calling convention in asm block to use parameters
38
39 error[E0787]: naked functions must contain a single asm block
40   --> $DIR/naked-functions.rs:34:1
41    |
42 LL | / pub unsafe extern "C" fn inc(a: u32) -> u32 {
43 LL | |
44 LL | |     a + 1
45    | |     ----- non-asm is unsupported in naked functions
46 LL | |
47 LL | | }
48    | |_^
49
50 error: referencing function parameters is not allowed in naked functions
51   --> $DIR/naked-functions.rs:42:31
52    |
53 LL |     asm!("/* {0} */", in(reg) a, options(noreturn));
54    |                               ^
55    |
56    = help: follow the calling convention in asm block to use parameters
57
58 error[E0787]: only `const` and `sym` operands are supported in naked functions
59   --> $DIR/naked-functions.rs:42:23
60    |
61 LL |     asm!("/* {0} */", in(reg) a, options(noreturn));
62    |                       ^^^^^^^^^
63
64 error[E0787]: naked functions must contain a single asm block
65   --> $DIR/naked-functions.rs:48:1
66    |
67 LL | / pub unsafe extern "C" fn inc_closure(a: u32) -> u32 {
68 LL | |
69 LL | |     (|| a + 1)()
70    | |     ------------ non-asm is unsupported in naked functions
71 LL | | }
72    | |_^
73
74 error[E0787]: only `const` and `sym` operands are supported in naked functions
75   --> $DIR/naked-functions.rs:65:10
76    |
77 LL |          in(reg) a,
78    |          ^^^^^^^^^
79 LL |
80 LL |          inlateout(reg) b,
81    |          ^^^^^^^^^^^^^^^^
82 LL |          inout(reg) c,
83    |          ^^^^^^^^^^^^
84 LL |          lateout(reg) d,
85    |          ^^^^^^^^^^^^^^
86 LL |          out(reg) e,
87    |          ^^^^^^^^^^
88
89 error[E0787]: asm in naked functions must use `noreturn` option
90   --> $DIR/naked-functions.rs:63:5
91    |
92 LL | /     asm!("/* {0} {1} {2} {3} {4} {5} {6} */",
93 LL | |
94 LL | |          in(reg) a,
95 LL | |
96 ...  |
97 LL | |          sym G,
98 LL | |     );
99    | |_____^
100
101 error[E0787]: naked functions must contain a single asm block
102   --> $DIR/naked-functions.rs:54:1
103    |
104 LL | / pub unsafe extern "C" fn unsupported_operands() {
105 LL | |
106 LL | |     let mut a = 0usize;
107    | |     ------------------- non-asm is unsupported in naked functions
108 LL | |     let mut b = 0usize;
109    | |     ------------------- non-asm is unsupported in naked functions
110 LL | |     let mut c = 0usize;
111    | |     ------------------- non-asm is unsupported in naked functions
112 LL | |     let mut d = 0usize;
113    | |     ------------------- non-asm is unsupported in naked functions
114 LL | |     let mut e = 0usize;
115    | |     ------------------- non-asm is unsupported in naked functions
116 ...  |
117 LL | |     );
118 LL | | }
119    | |_^
120
121 error[E0787]: naked functions must contain a single asm block
122   --> $DIR/naked-functions.rs:77:1
123    |
124 LL | / pub extern "C" fn missing_assembly() {
125 LL | |
126 LL | | }
127    | |_^
128
129 error[E0787]: asm in naked functions must use `noreturn` option
130   --> $DIR/naked-functions.rs:84:5
131    |
132 LL |     asm!("");
133    |     ^^^^^^^^
134
135 error[E0787]: asm in naked functions must use `noreturn` option
136   --> $DIR/naked-functions.rs:86:5
137    |
138 LL |     asm!("");
139    |     ^^^^^^^^
140
141 error[E0787]: asm in naked functions must use `noreturn` option
142   --> $DIR/naked-functions.rs:88:5
143    |
144 LL |     asm!("");
145    |     ^^^^^^^^
146
147 error[E0787]: naked functions must contain a single asm block
148   --> $DIR/naked-functions.rs:82:1
149    |
150 LL | / pub extern "C" fn too_many_asm_blocks() {
151 LL | |
152 LL | |     asm!("");
153 LL | |
154 LL | |     asm!("");
155    | |     -------- multiple asm blocks are unsupported in naked functions
156 LL | |
157 LL | |     asm!("");
158    | |     -------- multiple asm blocks are unsupported in naked functions
159 LL | |
160 LL | |     asm!("", options(noreturn));
161    | |     --------------------------- multiple asm blocks are unsupported in naked functions
162 LL | | }
163    | |_^
164
165 error: referencing function parameters is not allowed in naked functions
166   --> $DIR/naked-functions.rs:97:11
167    |
168 LL |         *&y
169    |           ^
170    |
171    = help: follow the calling convention in asm block to use parameters
172
173 error[E0787]: naked functions must contain a single asm block
174   --> $DIR/naked-functions.rs:95:5
175    |
176 LL | /     pub extern "C" fn inner(y: usize) -> usize {
177 LL | |
178 LL | |         *&y
179    | |         --- non-asm is unsupported in naked functions
180 LL | |
181 LL | |     }
182    | |_____^
183
184 error[E0787]: asm options unsupported in naked functions: `nomem`, `preserves_flags`
185   --> $DIR/naked-functions.rs:105:5
186    |
187 LL |     asm!("", options(nomem, preserves_flags, noreturn));
188    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
189
190 error[E0787]: asm options unsupported in naked functions: `nostack`, `pure`, `readonly`
191   --> $DIR/naked-functions.rs:111:5
192    |
193 LL |     asm!("", options(readonly, nostack), options(pure));
194    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
195
196 error[E0787]: asm in naked functions must use `noreturn` option
197   --> $DIR/naked-functions.rs:111:5
198    |
199 LL |     asm!("", options(readonly, nostack), options(pure));
200    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
201
202 error[E0787]: asm options unsupported in naked functions: `may_unwind`
203   --> $DIR/naked-functions.rs:119:5
204    |
205 LL |     asm!("", options(noreturn, may_unwind));
206    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
207
208 warning: Rust ABI is unsupported in naked functions
209   --> $DIR/naked-functions.rs:124:15
210    |
211 LL | pub unsafe fn default_abi() {
212    |               ^^^^^^^^^^^
213    |
214    = note: `#[warn(undefined_naked_function_abi)]` on by default
215
216 warning: Rust ABI is unsupported in naked functions
217   --> $DIR/naked-functions.rs:130:15
218    |
219 LL | pub unsafe fn rust_abi() {
220    |               ^^^^^^^^
221
222 error: naked functions cannot be inlined
223   --> $DIR/naked-functions.rs:170:1
224    |
225 LL | #[inline]
226    | ^^^^^^^^^
227
228 error: naked functions cannot be inlined
229   --> $DIR/naked-functions.rs:177:1
230    |
231 LL | #[inline(always)]
232    | ^^^^^^^^^^^^^^^^^
233
234 error: naked functions cannot be inlined
235   --> $DIR/naked-functions.rs:184:1
236    |
237 LL | #[inline(never)]
238    | ^^^^^^^^^^^^^^^^
239
240 error: naked functions cannot be inlined
241   --> $DIR/naked-functions.rs:191:1
242    |
243 LL | #[inline]
244    | ^^^^^^^^^
245
246 error: naked functions cannot be inlined
247   --> $DIR/naked-functions.rs:193:1
248    |
249 LL | #[inline(always)]
250    | ^^^^^^^^^^^^^^^^^
251
252 error: naked functions cannot be inlined
253   --> $DIR/naked-functions.rs:195:1
254    |
255 LL | #[inline(never)]
256    | ^^^^^^^^^^^^^^^^
257
258 error: aborting due to 30 previous errors; 2 warnings emitted
259
260 For more information about this error, try `rustc --explain E0787`.