1 error: functions cannot be both `const` and `async`
2 --> $DIR/fn-header-semantic-fail.rs:12:5
4 LL | const async unsafe extern "C" fn ff5() {}
5 | ^^^^^-^^^^^------------------------------
7 | | `async` because of this
8 | `const` because of this
10 error[E0706]: functions in traits cannot be declared `async`
11 --> $DIR/fn-header-semantic-fail.rs:17:9
16 | `async` because of this
18 = note: `async` trait functions are not currently supported
19 = note: consider using the `async-trait` crate: https://crates.io/crates/async-trait
21 error[E0379]: functions in traits cannot be declared const
22 --> $DIR/fn-header-semantic-fail.rs:19:9
25 | ^^^^^ functions in traits cannot be const
27 error[E0379]: functions in traits cannot be declared const
28 --> $DIR/fn-header-semantic-fail.rs:21:9
30 LL | const async unsafe extern "C" fn ft5();
31 | ^^^^^ functions in traits cannot be const
33 error[E0706]: functions in traits cannot be declared `async`
34 --> $DIR/fn-header-semantic-fail.rs:21:9
36 LL | const async unsafe extern "C" fn ft5();
37 | ^^^^^^-----^^^^^^^^^^^^^^^^^^^^^^^^^^^^
39 | `async` because of this
41 = note: `async` trait functions are not currently supported
42 = note: consider using the `async-trait` crate: https://crates.io/crates/async-trait
44 error: functions cannot be both `const` and `async`
45 --> $DIR/fn-header-semantic-fail.rs:21:9
47 LL | const async unsafe extern "C" fn ft5();
48 | ^^^^^-^^^^^----------------------------
50 | | `async` because of this
51 | `const` because of this
53 error[E0706]: functions in traits cannot be declared `async`
54 --> $DIR/fn-header-semantic-fail.rs:29:9
56 LL | async fn ft1() {}
59 | `async` because of this
61 = note: `async` trait functions are not currently supported
62 = note: consider using the `async-trait` crate: https://crates.io/crates/async-trait
64 error[E0379]: functions in traits cannot be declared const
65 --> $DIR/fn-header-semantic-fail.rs:32:9
67 LL | const fn ft3() {}
68 | ^^^^^ functions in traits cannot be const
70 error[E0379]: functions in traits cannot be declared const
71 --> $DIR/fn-header-semantic-fail.rs:34:9
73 LL | const async unsafe extern "C" fn ft5() {}
74 | ^^^^^ functions in traits cannot be const
76 error[E0706]: functions in traits cannot be declared `async`
77 --> $DIR/fn-header-semantic-fail.rs:34:9
79 LL | const async unsafe extern "C" fn ft5() {}
80 | ^^^^^^-----^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
82 | `async` because of this
84 = note: `async` trait functions are not currently supported
85 = note: consider using the `async-trait` crate: https://crates.io/crates/async-trait
87 error: functions cannot be both `const` and `async`
88 --> $DIR/fn-header-semantic-fail.rs:34:9
90 LL | const async unsafe extern "C" fn ft5() {}
91 | ^^^^^-^^^^^------------------------------
93 | | `async` because of this
94 | `const` because of this
96 error: functions cannot be both `const` and `async`
97 --> $DIR/fn-header-semantic-fail.rs:47:9
99 LL | const async unsafe extern "C" fn fi5() {}
100 | ^^^^^-^^^^^------------------------------
102 | | `async` because of this
103 | `const` because of this
105 error: functions in `extern` blocks cannot have qualifiers
106 --> $DIR/fn-header-semantic-fail.rs:53:18
109 | ---------- in this `extern` block
113 help: remove the qualifiers
118 error: functions in `extern` blocks cannot have qualifiers
119 --> $DIR/fn-header-semantic-fail.rs:54:19
122 | ---------- in this `extern` block
124 LL | unsafe fn fe2();
127 help: remove the qualifiers
132 error: functions in `extern` blocks cannot have qualifiers
133 --> $DIR/fn-header-semantic-fail.rs:55:18
136 | ---------- in this `extern` block
141 help: remove the qualifiers
146 error: functions in `extern` blocks cannot have qualifiers
147 --> $DIR/fn-header-semantic-fail.rs:56:23
150 | ---------- in this `extern` block
152 LL | extern "C" fn fe4();
155 help: remove the qualifiers
160 error: functions in `extern` blocks cannot have qualifiers
161 --> $DIR/fn-header-semantic-fail.rs:57:42
164 | ---------- in this `extern` block
166 LL | const async unsafe extern "C" fn fe5();
169 help: remove the qualifiers
174 error: functions cannot be both `const` and `async`
175 --> $DIR/fn-header-semantic-fail.rs:57:9
177 LL | const async unsafe extern "C" fn fe5();
178 | ^^^^^-^^^^^----------------------------
180 | | `async` because of this
181 | `const` because of this
183 error[E0391]: cycle detected when computing type of `main::ff5::{opaque#0}`
184 --> $DIR/fn-header-semantic-fail.rs:12:44
186 LL | const async unsafe extern "C" fn ff5() {}
189 note: ...which requires borrow-checking `main::ff5`...
190 --> $DIR/fn-header-semantic-fail.rs:12:5
192 LL | const async unsafe extern "C" fn ff5() {}
193 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
194 note: ...which requires processing `main::ff5`...
195 --> $DIR/fn-header-semantic-fail.rs:12:5
197 LL | const async unsafe extern "C" fn ff5() {}
198 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
199 note: ...which requires const checking `main::ff5`...
200 --> $DIR/fn-header-semantic-fail.rs:12:5
202 LL | const async unsafe extern "C" fn ff5() {}
203 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
204 = note: ...which requires computing whether `impl core::future::future::Future<Output = ()>` is freeze...
205 = note: ...which requires evaluating trait selection obligation `impl core::future::future::Future<Output = ()>: core::marker::Freeze`...
206 = note: ...which again requires computing type of `main::ff5::{opaque#0}`, completing the cycle
207 note: cycle used when checking item types in top-level module
208 --> $DIR/fn-header-semantic-fail.rs:5:1
210 LL | / #![feature(const_extern_fn)]
213 LL | | async fn ff1() {} // OK.
219 error[E0276]: impl has stricter requirements than trait
220 --> $DIR/fn-header-semantic-fail.rs:29:9
223 | --------------- definition of `ft1` from trait
225 LL | async fn ft1() {}
226 | ^^^^^^^^^^^^^^ impl has extra requirement `(): Future`
228 error[E0276]: impl has stricter requirements than trait
229 --> $DIR/fn-header-semantic-fail.rs:34:9
231 LL | const async unsafe extern "C" fn ft5();
232 | --------------------------------------- definition of `ft5` from trait
234 LL | const async unsafe extern "C" fn ft5() {}
235 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl has extra requirement `(): Future`
237 error[E0391]: cycle detected when computing type of `main::<impl at $DIR/fn-header-semantic-fail.rs:28:5: 28:17>::ft5::{opaque#0}`
238 --> $DIR/fn-header-semantic-fail.rs:34:48
240 LL | const async unsafe extern "C" fn ft5() {}
243 note: ...which requires borrow-checking `main::<impl at $DIR/fn-header-semantic-fail.rs:28:5: 28:17>::ft5`...
244 --> $DIR/fn-header-semantic-fail.rs:34:9
246 LL | const async unsafe extern "C" fn ft5() {}
247 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
248 note: ...which requires processing `main::<impl at $DIR/fn-header-semantic-fail.rs:28:5: 28:17>::ft5`...
249 --> $DIR/fn-header-semantic-fail.rs:34:9
251 LL | const async unsafe extern "C" fn ft5() {}
252 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
253 note: ...which requires const checking `main::<impl at $DIR/fn-header-semantic-fail.rs:28:5: 28:17>::ft5`...
254 --> $DIR/fn-header-semantic-fail.rs:34:9
256 LL | const async unsafe extern "C" fn ft5() {}
257 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
258 = note: ...which requires computing whether `impl core::future::future::Future<Output = ()>` is freeze...
259 = note: ...which requires evaluating trait selection obligation `impl core::future::future::Future<Output = ()>: core::marker::Freeze`...
260 = note: ...which again requires computing type of `main::<impl at $DIR/fn-header-semantic-fail.rs:28:5: 28:17>::ft5::{opaque#0}`, completing the cycle
261 note: cycle used when checking item types in top-level module
262 --> $DIR/fn-header-semantic-fail.rs:5:1
264 LL | / #![feature(const_extern_fn)]
267 LL | | async fn ff1() {} // OK.
273 error[E0391]: cycle detected when computing type of `main::<impl at $DIR/fn-header-semantic-fail.rs:42:5: 42:11>::fi5::{opaque#0}`
274 --> $DIR/fn-header-semantic-fail.rs:47:48
276 LL | const async unsafe extern "C" fn fi5() {}
279 note: ...which requires borrow-checking `main::<impl at $DIR/fn-header-semantic-fail.rs:42:5: 42:11>::fi5`...
280 --> $DIR/fn-header-semantic-fail.rs:47:9
282 LL | const async unsafe extern "C" fn fi5() {}
283 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
284 note: ...which requires processing `main::<impl at $DIR/fn-header-semantic-fail.rs:42:5: 42:11>::fi5`...
285 --> $DIR/fn-header-semantic-fail.rs:47:9
287 LL | const async unsafe extern "C" fn fi5() {}
288 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
289 note: ...which requires const checking `main::<impl at $DIR/fn-header-semantic-fail.rs:42:5: 42:11>::fi5`...
290 --> $DIR/fn-header-semantic-fail.rs:47:9
292 LL | const async unsafe extern "C" fn fi5() {}
293 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
294 = note: ...which requires computing whether `impl core::future::future::Future<Output = ()>` is freeze...
295 = note: ...which requires evaluating trait selection obligation `impl core::future::future::Future<Output = ()>: core::marker::Freeze`...
296 = note: ...which again requires computing type of `main::<impl at $DIR/fn-header-semantic-fail.rs:42:5: 42:11>::fi5::{opaque#0}`, completing the cycle
297 note: cycle used when checking item types in top-level module
298 --> $DIR/fn-header-semantic-fail.rs:5:1
300 LL | / #![feature(const_extern_fn)]
303 LL | | async fn ff1() {} // OK.
309 error: aborting due to 23 previous errors
311 Some errors have detailed explanations: E0276, E0379, E0391, E0706.
312 For more information about an error, try `rustc --explain E0276`.