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() {} // 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:16: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:18: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:20: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:20: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:20: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:28: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:31: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:33: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:33: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:33: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:45: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:50: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:51: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:52: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:53: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:54: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:54:9
177 LL | const async unsafe extern "C" fn fe5();
178 | ^^^^^-^^^^^----------------------------
180 | | `async` because of this
181 | `const` because of this
183 error[E0053]: method `ft1` has an incompatible type for trait
184 --> $DIR/fn-header-semantic-fail.rs:28:24
186 LL | async fn ft1() {}
189 | checked the `Output` of this `async fn`, found opaque type
190 | expected `()`, found opaque type
192 = note: while checking the return type of the `async fn`
194 --> $DIR/fn-header-semantic-fail.rs:16:23
198 = note: expected fn pointer `fn()`
199 found fn pointer `fn() -> impl Future<Output = ()>`
201 error[E0053]: method `ft5` has an incompatible type for trait
202 --> $DIR/fn-header-semantic-fail.rs:33:48
204 LL | const async unsafe extern "C" fn ft5() {}
207 | checked the `Output` of this `async fn`, found opaque type
208 | expected `()`, found opaque type
210 = note: while checking the return type of the `async fn`
212 --> $DIR/fn-header-semantic-fail.rs:20:47
214 LL | const async unsafe extern "C" fn ft5();
216 = note: expected fn pointer `unsafe extern "C" fn()`
217 found fn pointer `unsafe extern "C" fn() -> impl Future<Output = ()>`
219 error: aborting due to 20 previous errors
221 Some errors have detailed explanations: E0053, E0379, E0706.
222 For more information about an error, try `rustc --explain E0053`.