@@ -8,7 +8,7 @@ LL | const async unsafe extern "C" fn ff5() {} // OK.
8
8
| `const` because of this
9
9
10
10
error[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
12
12
|
13
13
LL | async fn ft1();
14
14
| -----^^^^^^^^^^
@@ -19,19 +19,19 @@ LL | async fn ft1();
19
19
= note: consider using the `async-trait` crate: https://crates.io/crates/async-trait
20
20
21
21
error[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
23
23
|
24
24
LL | const fn ft3();
25
25
| ^^^^^ functions in traits cannot be const
26
26
27
27
error[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
29
29
|
30
30
LL | const async unsafe extern "C" fn ft5();
31
31
| ^^^^^ functions in traits cannot be const
32
32
33
33
error[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
35
35
|
36
36
LL | const async unsafe extern "C" fn ft5();
37
37
| ^^^^^^-----^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -42,7 +42,7 @@ LL | const async unsafe extern "C" fn ft5();
42
42
= note: consider using the `async-trait` crate: https://crates.io/crates/async-trait
43
43
44
44
error: 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
46
46
|
47
47
LL | const async unsafe extern "C" fn ft5();
48
48
| ^^^^^-^^^^^----------------------------
@@ -51,7 +51,7 @@ LL | const async unsafe extern "C" fn ft5();
51
51
| `const` because of this
52
52
53
53
error[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
55
55
|
56
56
LL | async fn ft1() {}
57
57
| -----^^^^^^^^^^^^
@@ -62,19 +62,19 @@ LL | async fn ft1() {}
62
62
= note: consider using the `async-trait` crate: https://crates.io/crates/async-trait
63
63
64
64
error[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
66
66
|
67
67
LL | const fn ft3() {}
68
68
| ^^^^^ functions in traits cannot be const
69
69
70
70
error[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
72
72
|
73
73
LL | const async unsafe extern "C" fn ft5() {}
74
74
| ^^^^^ functions in traits cannot be const
75
75
76
76
error[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
78
78
|
79
79
LL | const async unsafe extern "C" fn ft5() {}
80
80
| ^^^^^^-----^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -85,7 +85,7 @@ LL | const async unsafe extern "C" fn ft5() {}
85
85
= note: consider using the `async-trait` crate: https://crates.io/crates/async-trait
86
86
87
87
error: 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
89
89
|
90
90
LL | const async unsafe extern "C" fn ft5() {}
91
91
| ^^^^^-^^^^^------------------------------
@@ -94,7 +94,7 @@ LL | const async unsafe extern "C" fn ft5() {}
94
94
| `const` because of this
95
95
96
96
error: 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
98
98
|
99
99
LL | const async unsafe extern "C" fn fi5() {}
100
100
| ^^^^^-^^^^^------------------------------
@@ -103,7 +103,7 @@ LL | const async unsafe extern "C" fn fi5() {}
103
103
| `const` because of this
104
104
105
105
error: 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
107
107
|
108
108
LL | extern {
109
109
| ------ in this `extern` block
@@ -113,7 +113,7 @@ LL | async fn fe1();
113
113
| help: remove the qualifiers: `fn`
114
114
115
115
error: 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
117
117
|
118
118
LL | extern {
119
119
| ------ in this `extern` block
@@ -124,7 +124,7 @@ LL | unsafe fn fe2();
124
124
| help: remove the qualifiers: `fn`
125
125
126
126
error: 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
128
128
|
129
129
LL | extern {
130
130
| ------ in this `extern` block
@@ -135,7 +135,7 @@ LL | const fn fe3();
135
135
| help: remove the qualifiers: `fn`
136
136
137
137
error: 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
139
139
|
140
140
LL | extern {
141
141
| ------ in this `extern` block
@@ -146,7 +146,7 @@ LL | extern "C" fn fe4();
146
146
| help: remove the qualifiers: `fn`
147
147
148
148
error: 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
150
150
|
151
151
LL | extern {
152
152
| ------ in this `extern` block
@@ -157,24 +157,16 @@ LL | const async unsafe extern "C" fn fe5();
157
157
| help: remove the qualifiers: `fn`
158
158
159
159
error: 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
161
161
|
162
162
LL | const async unsafe extern "C" fn fe5();
163
163
| ^^^^^-^^^^^----------------------------
164
164
| | |
165
165
| | `async` because of this
166
166
| `const` because of this
167
167
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
-
176
168
error[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
178
170
|
179
171
LL | async fn ft1();
180
172
| - type in trait
@@ -189,7 +181,7 @@ LL | async fn ft1() {}
189
181
found fn pointer `fn() -> impl Future`
190
182
191
183
error[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
193
185
|
194
186
LL | const async unsafe extern "C" fn ft5();
195
187
| - type in trait
@@ -203,23 +195,7 @@ LL | const async unsafe extern "C" fn ft5() {}
203
195
= note: expected fn pointer `unsafe extern "C" fn()`
204
196
found fn pointer `unsafe extern "C" fn() -> impl Future`
205
197
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
223
199
224
200
Some errors have detailed explanations: E0053, E0379, E0706.
225
201
For more information about an error, try `rustc --explain E0053`.
0 commit comments