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[E0379]: functions in traits cannot be declared const
11 --> $DIR/fn-header-semantic-fail.rs:19:9
14 | ^^^^^ functions in traits cannot be const
16 error[E0379]: functions in traits cannot be declared const
17 --> $DIR/fn-header-semantic-fail.rs:21:9
19 LL | const async unsafe extern "C" fn ft5();
20 | ^^^^^ functions in traits cannot be const
22 error: functions cannot be both `const` and `async`
23 --> $DIR/fn-header-semantic-fail.rs:21:9
25 LL | const async unsafe extern "C" fn ft5();
26 | ^^^^^-^^^^^----------------------------
28 | | `async` because of this
29 | `const` because of this
31 error[E0379]: functions in traits cannot be declared const
32 --> $DIR/fn-header-semantic-fail.rs:31:9
34 LL | const fn ft3() {}
35 | ^^^^^ functions in traits cannot be const
37 error[E0379]: functions in traits cannot be declared const
38 --> $DIR/fn-header-semantic-fail.rs:33:9
40 LL | const async unsafe extern "C" fn ft5() {}
41 | ^^^^^ functions in traits cannot be const
43 error: functions cannot be both `const` and `async`
44 --> $DIR/fn-header-semantic-fail.rs:33:9
46 LL | const async unsafe extern "C" fn ft5() {}
47 | ^^^^^-^^^^^------------------------------
49 | | `async` because of this
50 | `const` because of this
52 error: functions cannot be both `const` and `async`
53 --> $DIR/fn-header-semantic-fail.rs:45:9
55 LL | const async unsafe extern "C" fn fi5() {}
56 | ^^^^^-^^^^^------------------------------
58 | | `async` because of this
59 | `const` because of this
61 error: functions in `extern` blocks cannot have qualifiers
62 --> $DIR/fn-header-semantic-fail.rs:51:18
65 | ---------- in this `extern` block
69 help: remove the qualifiers
74 error: functions in `extern` blocks cannot have qualifiers
75 --> $DIR/fn-header-semantic-fail.rs:52:19
78 | ---------- in this `extern` block
83 help: remove the qualifiers
88 error: functions in `extern` blocks cannot have qualifiers
89 --> $DIR/fn-header-semantic-fail.rs:53:18
92 | ---------- in this `extern` block
97 help: remove the qualifiers
102 error: functions in `extern` blocks cannot have qualifiers
103 --> $DIR/fn-header-semantic-fail.rs:54:23
106 | ---------- in this `extern` block
108 LL | extern "C" fn fe4();
111 help: remove the qualifiers
116 error: functions in `extern` blocks cannot have qualifiers
117 --> $DIR/fn-header-semantic-fail.rs:55:42
120 | ---------- in this `extern` block
122 LL | const async unsafe extern "C" fn fe5();
125 help: remove the qualifiers
130 error: functions cannot be both `const` and `async`
131 --> $DIR/fn-header-semantic-fail.rs:55:9
133 LL | const async unsafe extern "C" fn fe5();
134 | ^^^^^-^^^^^----------------------------
136 | | `async` because of this
137 | `const` because of this
139 error[E0706]: functions in traits cannot be declared `async`
140 --> $DIR/fn-header-semantic-fail.rs:17:9
145 | `async` because of this
147 = note: `async` trait functions are not currently supported
148 = note: consider using the `async-trait` crate: https://crates.io/crates/async-trait
149 = note: see issue #91611 <https://github.com/rust-lang/rust/issues/91611> for more information
150 = help: add `#![feature(async_fn_in_trait)]` to the crate attributes to enable
152 error[E0706]: functions in traits cannot be declared `async`
153 --> $DIR/fn-header-semantic-fail.rs:21:9
155 LL | const async unsafe extern "C" fn ft5();
156 | ^^^^^^-----^^^^^^^^^^^^^^^^^^^^^^^^^^^^
158 | `async` because of this
160 = note: `async` trait functions are not currently supported
161 = note: consider using the `async-trait` crate: https://crates.io/crates/async-trait
162 = note: see issue #91611 <https://github.com/rust-lang/rust/issues/91611> for more information
163 = help: add `#![feature(async_fn_in_trait)]` to the crate attributes to enable
165 error[E0706]: functions in traits cannot be declared `async`
166 --> $DIR/fn-header-semantic-fail.rs:29:9
168 LL | async fn ft1() {}
171 | `async` because of this
173 = note: `async` trait functions are not currently supported
174 = note: consider using the `async-trait` crate: https://crates.io/crates/async-trait
175 = note: see issue #91611 <https://github.com/rust-lang/rust/issues/91611> for more information
176 = help: add `#![feature(async_fn_in_trait)]` to the crate attributes to enable
178 error[E0706]: functions in traits cannot be declared `async`
179 --> $DIR/fn-header-semantic-fail.rs:33:9
181 LL | const async unsafe extern "C" fn ft5() {}
182 | ^^^^^^-----^^^^^^^^^^^^^^^^^^^^^^^^^^^
184 | `async` because of this
186 = note: `async` trait functions are not currently supported
187 = note: consider using the `async-trait` crate: https://crates.io/crates/async-trait
188 = note: see issue #91611 <https://github.com/rust-lang/rust/issues/91611> for more information
189 = help: add `#![feature(async_fn_in_trait)]` to the crate attributes to enable
191 error[E0391]: cycle detected when computing type of `main::ff5::{opaque#0}`
192 --> $DIR/fn-header-semantic-fail.rs:12:44
194 LL | const async unsafe extern "C" fn ff5() {}
197 note: ...which requires borrow-checking `main::ff5`...
198 --> $DIR/fn-header-semantic-fail.rs:12:5
200 LL | const async unsafe extern "C" fn ff5() {}
201 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
202 note: ...which requires processing MIR for `main::ff5`...
203 --> $DIR/fn-header-semantic-fail.rs:12:5
205 LL | const async unsafe extern "C" fn ff5() {}
206 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
207 note: ...which requires const checking `main::ff5`...
208 --> $DIR/fn-header-semantic-fail.rs:12:5
210 LL | const async unsafe extern "C" fn ff5() {}
211 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
212 = note: ...which requires computing whether `impl core::future::future::Future<Output = ()>` is freeze...
213 = note: ...which requires evaluating trait selection obligation `impl core::future::future::Future<Output = ()>: core::marker::Freeze`...
214 = note: ...which again requires computing type of `main::ff5::{opaque#0}`, completing the cycle
215 note: cycle used when checking item types in top-level module
216 --> $DIR/fn-header-semantic-fail.rs:5:1
218 LL | / #![feature(const_extern_fn)]
221 LL | | async fn ff1() {} // OK.
227 error[E0391]: cycle detected when computing type of `main::<impl at $DIR/fn-header-semantic-fail.rs:28:5: 28:17>::ft5::{opaque#0}`
228 --> $DIR/fn-header-semantic-fail.rs:33:48
230 LL | const async unsafe extern "C" fn ft5() {}
233 note: ...which requires borrow-checking `main::<impl at $DIR/fn-header-semantic-fail.rs:28:5: 28:17>::ft5`...
234 --> $DIR/fn-header-semantic-fail.rs:33:9
236 LL | const async unsafe extern "C" fn ft5() {}
237 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
238 note: ...which requires processing MIR for `main::<impl at $DIR/fn-header-semantic-fail.rs:28:5: 28:17>::ft5`...
239 --> $DIR/fn-header-semantic-fail.rs:33:9
241 LL | const async unsafe extern "C" fn ft5() {}
242 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
243 note: ...which requires const checking `main::<impl at $DIR/fn-header-semantic-fail.rs:28:5: 28:17>::ft5`...
244 --> $DIR/fn-header-semantic-fail.rs:33:9
246 LL | const async unsafe extern "C" fn ft5() {}
247 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
248 = note: ...which requires computing whether `impl core::future::future::Future<Output = ()>` is freeze...
249 = note: ...which requires evaluating trait selection obligation `impl core::future::future::Future<Output = ()>: core::marker::Freeze`...
250 = 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
251 note: cycle used when checking item types in top-level module
252 --> $DIR/fn-header-semantic-fail.rs:5:1
254 LL | / #![feature(const_extern_fn)]
257 LL | | async fn ff1() {} // OK.
263 error[E0391]: cycle detected when computing type of `main::<impl at $DIR/fn-header-semantic-fail.rs:40:5: 40:11>::fi5::{opaque#0}`
264 --> $DIR/fn-header-semantic-fail.rs:45:48
266 LL | const async unsafe extern "C" fn fi5() {}
269 note: ...which requires borrow-checking `main::<impl at $DIR/fn-header-semantic-fail.rs:40:5: 40:11>::fi5`...
270 --> $DIR/fn-header-semantic-fail.rs:45:9
272 LL | const async unsafe extern "C" fn fi5() {}
273 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
274 note: ...which requires processing MIR for `main::<impl at $DIR/fn-header-semantic-fail.rs:40:5: 40:11>::fi5`...
275 --> $DIR/fn-header-semantic-fail.rs:45:9
277 LL | const async unsafe extern "C" fn fi5() {}
278 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
279 note: ...which requires const checking `main::<impl at $DIR/fn-header-semantic-fail.rs:40:5: 40:11>::fi5`...
280 --> $DIR/fn-header-semantic-fail.rs:45:9
282 LL | const async unsafe extern "C" fn fi5() {}
283 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
284 = note: ...which requires computing whether `impl core::future::future::Future<Output = ()>` is freeze...
285 = note: ...which requires evaluating trait selection obligation `impl core::future::future::Future<Output = ()>: core::marker::Freeze`...
286 = note: ...which again requires computing type of `main::<impl at $DIR/fn-header-semantic-fail.rs:40:5: 40:11>::fi5::{opaque#0}`, completing the cycle
287 note: cycle used when checking item types in top-level module
288 --> $DIR/fn-header-semantic-fail.rs:5:1
290 LL | / #![feature(const_extern_fn)]
293 LL | | async fn ff1() {} // OK.
299 error: aborting due to 21 previous errors
301 Some errors have detailed explanations: E0379, E0391, E0706.
302 For more information about an error, try `rustc --explain E0379`.