@@ -8,7 +8,7 @@ LL | const async unsafe extern "C" fn ff5() {} // OK.
88 | `const` because of this
99
1010error[E0706]: functions in traits cannot be declared `async`
11- --> $DIR/fn-header-semantic-fail.rs:18 :9
11+ --> $DIR/fn-header-semantic-fail.rs:17 :9
1212 |
1313LL | async fn ft1();
1414 | -----^^^^^^^^^^
@@ -19,19 +19,19 @@ LL | async fn ft1();
1919 = note: consider using the `async-trait` crate: https://crates.io/crates/async-trait
2020
2121error[E0379]: functions in traits cannot be declared const
22- --> $DIR/fn-header-semantic-fail.rs:20 :9
22+ --> $DIR/fn-header-semantic-fail.rs:19 :9
2323 |
2424LL | const fn ft3();
2525 | ^^^^^ functions in traits cannot be const
2626
2727error[E0379]: functions in traits cannot be declared const
28- --> $DIR/fn-header-semantic-fail.rs:22 :9
28+ --> $DIR/fn-header-semantic-fail.rs:21 :9
2929 |
3030LL | const async unsafe extern "C" fn ft5();
3131 | ^^^^^ functions in traits cannot be const
3232
3333error[E0706]: functions in traits cannot be declared `async`
34- --> $DIR/fn-header-semantic-fail.rs:22 :9
34+ --> $DIR/fn-header-semantic-fail.rs:21 :9
3535 |
3636LL | const async unsafe extern "C" fn ft5();
3737 | ^^^^^^-----^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -42,7 +42,7 @@ LL | const async unsafe extern "C" fn ft5();
4242 = note: consider using the `async-trait` crate: https://crates.io/crates/async-trait
4343
4444error: functions cannot be both `const` and `async`
45- --> $DIR/fn-header-semantic-fail.rs:22 :9
45+ --> $DIR/fn-header-semantic-fail.rs:21 :9
4646 |
4747LL | const async unsafe extern "C" fn ft5();
4848 | ^^^^^-^^^^^----------------------------
@@ -51,7 +51,7 @@ LL | const async unsafe extern "C" fn ft5();
5151 | `const` because of this
5252
5353error[E0706]: functions in traits cannot be declared `async`
54- --> $DIR/fn-header-semantic-fail.rs:30 :9
54+ --> $DIR/fn-header-semantic-fail.rs:29 :9
5555 |
5656LL | async fn ft1() {}
5757 | -----^^^^^^^^^^^^
@@ -62,19 +62,19 @@ LL | async fn ft1() {}
6262 = note: consider using the `async-trait` crate: https://crates.io/crates/async-trait
6363
6464error[E0379]: functions in traits cannot be declared const
65- --> $DIR/fn-header-semantic-fail.rs:33 :9
65+ --> $DIR/fn-header-semantic-fail.rs:32 :9
6666 |
6767LL | const fn ft3() {}
6868 | ^^^^^ functions in traits cannot be const
6969
7070error[E0379]: functions in traits cannot be declared const
71- --> $DIR/fn-header-semantic-fail.rs:35 :9
71+ --> $DIR/fn-header-semantic-fail.rs:34 :9
7272 |
7373LL | const async unsafe extern "C" fn ft5() {}
7474 | ^^^^^ functions in traits cannot be const
7575
7676error[E0706]: functions in traits cannot be declared `async`
77- --> $DIR/fn-header-semantic-fail.rs:35 :9
77+ --> $DIR/fn-header-semantic-fail.rs:34 :9
7878 |
7979LL | const async unsafe extern "C" fn ft5() {}
8080 | ^^^^^^-----^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -85,7 +85,7 @@ LL | const async unsafe extern "C" fn ft5() {}
8585 = note: consider using the `async-trait` crate: https://crates.io/crates/async-trait
8686
8787error: functions cannot be both `const` and `async`
88- --> $DIR/fn-header-semantic-fail.rs:35 :9
88+ --> $DIR/fn-header-semantic-fail.rs:34 :9
8989 |
9090LL | const async unsafe extern "C" fn ft5() {}
9191 | ^^^^^-^^^^^------------------------------
@@ -94,7 +94,7 @@ LL | const async unsafe extern "C" fn ft5() {}
9494 | `const` because of this
9595
9696error: functions cannot be both `const` and `async`
97- --> $DIR/fn-header-semantic-fail.rs:48 :9
97+ --> $DIR/fn-header-semantic-fail.rs:46 :9
9898 |
9999LL | const async unsafe extern "C" fn fi5() {}
100100 | ^^^^^-^^^^^------------------------------
@@ -103,7 +103,7 @@ LL | const async unsafe extern "C" fn fi5() {}
103103 | `const` because of this
104104
105105error: functions in `extern` blocks cannot have qualifiers
106- --> $DIR/fn-header-semantic-fail.rs:54 :18
106+ --> $DIR/fn-header-semantic-fail.rs:51 :18
107107 |
108108LL | extern {
109109 | ------ in this `extern` block
@@ -113,7 +113,7 @@ LL | async fn fe1();
113113 | help: remove the qualifiers: `fn`
114114
115115error: functions in `extern` blocks cannot have qualifiers
116- --> $DIR/fn-header-semantic-fail.rs:55 :19
116+ --> $DIR/fn-header-semantic-fail.rs:52 :19
117117 |
118118LL | extern {
119119 | ------ in this `extern` block
@@ -124,7 +124,7 @@ LL | unsafe fn fe2();
124124 | help: remove the qualifiers: `fn`
125125
126126error: functions in `extern` blocks cannot have qualifiers
127- --> $DIR/fn-header-semantic-fail.rs:56 :18
127+ --> $DIR/fn-header-semantic-fail.rs:53 :18
128128 |
129129LL | extern {
130130 | ------ in this `extern` block
@@ -135,7 +135,7 @@ LL | const fn fe3();
135135 | help: remove the qualifiers: `fn`
136136
137137error: functions in `extern` blocks cannot have qualifiers
138- --> $DIR/fn-header-semantic-fail.rs:57 :23
138+ --> $DIR/fn-header-semantic-fail.rs:54 :23
139139 |
140140LL | extern {
141141 | ------ in this `extern` block
@@ -146,7 +146,7 @@ LL | extern "C" fn fe4();
146146 | help: remove the qualifiers: `fn`
147147
148148error: functions in `extern` blocks cannot have qualifiers
149- --> $DIR/fn-header-semantic-fail.rs:58 :42
149+ --> $DIR/fn-header-semantic-fail.rs:55 :42
150150 |
151151LL | extern {
152152 | ------ in this `extern` block
@@ -157,24 +157,16 @@ LL | const async unsafe extern "C" fn fe5();
157157 | help: remove the qualifiers: `fn`
158158
159159error: functions cannot be both `const` and `async`
160- --> $DIR/fn-header-semantic-fail.rs:58 :9
160+ --> $DIR/fn-header-semantic-fail.rs:55 :9
161161 |
162162LL | const async unsafe extern "C" fn fe5();
163163 | ^^^^^-^^^^^----------------------------
164164 | | |
165165 | | `async` because of this
166166 | `const` because of this
167167
168- error: `from_generator` is not yet stable as a const fn
169- --> $DIR/fn-header-semantic-fail.rs:13:44
170- |
171- LL | const async unsafe extern "C" fn ff5() {} // OK.
172- | ^^
173- |
174- = help: add `#![feature(gen_future)]` to the crate attributes to enable
175-
176168error[E0053]: method `ft1` has an incompatible type for trait
177- --> $DIR/fn-header-semantic-fail.rs:30 :24
169+ --> $DIR/fn-header-semantic-fail.rs:29 :24
178170 |
179171LL | async fn ft1();
180172 | - type in trait
@@ -189,7 +181,7 @@ LL | async fn ft1() {}
189181 found fn pointer `fn() -> impl Future`
190182
191183error[E0053]: method `ft5` has an incompatible type for trait
192- --> $DIR/fn-header-semantic-fail.rs:35 :48
184+ --> $DIR/fn-header-semantic-fail.rs:34 :48
193185 |
194186LL | const async unsafe extern "C" fn ft5();
195187 | - type in trait
@@ -203,23 +195,7 @@ LL | const async unsafe extern "C" fn ft5() {}
203195 = note: expected fn pointer `unsafe extern "C" fn()`
204196 found fn pointer `unsafe extern "C" fn() -> impl Future`
205197
206- error: `from_generator` is not yet stable as a const fn
207- --> $DIR/fn-header-semantic-fail.rs:35:48
208- |
209- LL | const async unsafe extern "C" fn ft5() {}
210- | ^^
211- |
212- = help: add `#![feature(gen_future)]` to the crate attributes to enable
213-
214- error: `from_generator` is not yet stable as a const fn
215- --> $DIR/fn-header-semantic-fail.rs:48:48
216- |
217- LL | const async unsafe extern "C" fn fi5() {}
218- | ^^
219- |
220- = help: add `#![feature(gen_future)]` to the crate attributes to enable
221-
222- error: aborting due to 23 previous errors
198+ error: aborting due to 20 previous errors
223199
224200Some errors have detailed explanations: E0053, E0379, E0706.
225201For more information about an error, try `rustc --explain E0053`.
0 commit comments