1 error: functions cannot be both `const` and `async`
2 --> $DIR/fn-header-semantic-fail.rs:13:5
4 LL | const async unsafe extern "C" fn ff5() {} // OK.
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:18: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:20: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:22: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:22: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:22: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:30: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:33: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:35: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:35: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:35: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:48: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:54:18
109 | ------ in this `extern` block
113 | help: remove the qualifiers: `fn`
115 error: functions in `extern` blocks cannot have qualifiers
116 --> $DIR/fn-header-semantic-fail.rs:55:19
119 | ------ in this `extern` block
121 LL | unsafe fn fe2();
124 | help: remove the qualifiers: `fn`
126 error: functions in `extern` blocks cannot have qualifiers
127 --> $DIR/fn-header-semantic-fail.rs:56:18
130 | ------ in this `extern` block
135 | help: remove the qualifiers: `fn`
137 error: functions in `extern` blocks cannot have qualifiers
138 --> $DIR/fn-header-semantic-fail.rs:57:23
141 | ------ in this `extern` block
143 LL | extern "C" fn fe4();
146 | help: remove the qualifiers: `fn`
148 error: functions in `extern` blocks cannot have qualifiers
149 --> $DIR/fn-header-semantic-fail.rs:58:42
152 | ------ in this `extern` block
154 LL | const async unsafe extern "C" fn fe5();
155 | ---------------------------------^^^
157 | help: remove the qualifiers: `fn`
159 error: functions cannot be both `const` and `async`
160 --> $DIR/fn-header-semantic-fail.rs:58:9
162 LL | const async unsafe extern "C" fn fe5();
163 | ^^^^^-^^^^^----------------------------
165 | | `async` because of this
166 | `const` because of this
168 error: `from_generator` is not yet stable as a const fn
169 --> $DIR/fn-header-semantic-fail.rs:13:44
171 LL | const async unsafe extern "C" fn ff5() {} // OK.
174 = help: add `#![feature(gen_future)]` to the crate attributes to enable
176 error[E0053]: method `ft1` has an incompatible type for trait
177 --> $DIR/fn-header-semantic-fail.rs:30:24
182 LL | async fn ft1() {}
185 | the `Output` of this `async fn`'s found opaque type
186 | expected `()`, found opaque type
188 = note: expected fn pointer `fn()`
189 found fn pointer `fn() -> impl Future`
191 error[E0053]: method `ft5` has an incompatible type for trait
192 --> $DIR/fn-header-semantic-fail.rs:35:48
194 LL | const async unsafe extern "C" fn ft5();
197 LL | const async unsafe extern "C" fn ft5() {}
200 | the `Output` of this `async fn`'s found opaque type
201 | expected `()`, found opaque type
203 = note: expected fn pointer `unsafe extern "C" fn()`
204 found fn pointer `unsafe extern "C" fn() -> impl Future`
206 error: `from_generator` is not yet stable as a const fn
207 --> $DIR/fn-header-semantic-fail.rs:35:48
209 LL | const async unsafe extern "C" fn ft5() {}
212 = help: add `#![feature(gen_future)]` to the crate attributes to enable
214 error: `from_generator` is not yet stable as a const fn
215 --> $DIR/fn-header-semantic-fail.rs:48:48
217 LL | const async unsafe extern "C" fn fi5() {}
220 = help: add `#![feature(gen_future)]` to the crate attributes to enable
222 error: aborting due to 23 previous errors
224 Some errors have detailed explanations: E0053, E0379, E0706.
225 For more information about an error, try `rustc --explain E0053`.