]> git.proxmox.com Git - rustc.git/blame - src/test/ui/parser/fn-header-semantic-fail.stderr
New upstream version 1.58.1+dfsg1
[rustc.git] / src / test / ui / parser / fn-header-semantic-fail.stderr
CommitLineData
74b04a01 1error: functions cannot be both `const` and `async`
17df50a5 2 --> $DIR/fn-header-semantic-fail.rs:12:5
74b04a01
XL
3 |
4LL | const async unsafe extern "C" fn ff5() {} // OK.
ba9703b0 5 | ^^^^^-^^^^^------------------------------
74b04a01
XL
6 | | |
7 | | `async` because of this
8 | `const` because of this
9
10error[E0706]: functions in traits cannot be declared `async`
17df50a5 11 --> $DIR/fn-header-semantic-fail.rs:16:9
74b04a01
XL
12 |
13LL | async fn ft1();
14 | -----^^^^^^^^^^
15 | |
16 | `async` because of this
17 |
18 = note: `async` trait functions are not currently supported
19 = note: consider using the `async-trait` crate: https://crates.io/crates/async-trait
20
21error[E0379]: functions in traits cannot be declared const
17df50a5 22 --> $DIR/fn-header-semantic-fail.rs:18:9
74b04a01
XL
23 |
24LL | const fn ft3();
25 | ^^^^^ functions in traits cannot be const
26
27error[E0379]: functions in traits cannot be declared const
17df50a5 28 --> $DIR/fn-header-semantic-fail.rs:20:9
74b04a01
XL
29 |
30LL | const async unsafe extern "C" fn ft5();
31 | ^^^^^ functions in traits cannot be const
32
33error[E0706]: functions in traits cannot be declared `async`
17df50a5 34 --> $DIR/fn-header-semantic-fail.rs:20:9
74b04a01
XL
35 |
36LL | const async unsafe extern "C" fn ft5();
37 | ^^^^^^-----^^^^^^^^^^^^^^^^^^^^^^^^^^^^
38 | |
39 | `async` because of this
40 |
41 = note: `async` trait functions are not currently supported
42 = note: consider using the `async-trait` crate: https://crates.io/crates/async-trait
43
44error: functions cannot be both `const` and `async`
17df50a5 45 --> $DIR/fn-header-semantic-fail.rs:20:9
74b04a01
XL
46 |
47LL | const async unsafe extern "C" fn ft5();
ba9703b0 48 | ^^^^^-^^^^^----------------------------
74b04a01
XL
49 | | |
50 | | `async` because of this
51 | `const` because of this
52
53error[E0706]: functions in traits cannot be declared `async`
17df50a5 54 --> $DIR/fn-header-semantic-fail.rs:28:9
74b04a01
XL
55 |
56LL | async fn ft1() {}
57 | -----^^^^^^^^^^^^
58 | |
59 | `async` because of this
60 |
61 = note: `async` trait functions are not currently supported
62 = note: consider using the `async-trait` crate: https://crates.io/crates/async-trait
63
64error[E0379]: functions in traits cannot be declared const
17df50a5 65 --> $DIR/fn-header-semantic-fail.rs:31:9
74b04a01
XL
66 |
67LL | const fn ft3() {}
68 | ^^^^^ functions in traits cannot be const
69
70error[E0379]: functions in traits cannot be declared const
17df50a5 71 --> $DIR/fn-header-semantic-fail.rs:33:9
74b04a01
XL
72 |
73LL | const async unsafe extern "C" fn ft5() {}
74 | ^^^^^ functions in traits cannot be const
75
76error[E0706]: functions in traits cannot be declared `async`
17df50a5 77 --> $DIR/fn-header-semantic-fail.rs:33:9
74b04a01
XL
78 |
79LL | const async unsafe extern "C" fn ft5() {}
80 | ^^^^^^-----^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
81 | |
82 | `async` because of this
83 |
84 = note: `async` trait functions are not currently supported
85 = note: consider using the `async-trait` crate: https://crates.io/crates/async-trait
86
87error: functions cannot be both `const` and `async`
17df50a5 88 --> $DIR/fn-header-semantic-fail.rs:33:9
74b04a01
XL
89 |
90LL | const async unsafe extern "C" fn ft5() {}
ba9703b0 91 | ^^^^^-^^^^^------------------------------
74b04a01
XL
92 | | |
93 | | `async` because of this
94 | `const` because of this
95
96error: functions cannot be both `const` and `async`
17df50a5 97 --> $DIR/fn-header-semantic-fail.rs:45:9
74b04a01
XL
98 |
99LL | const async unsafe extern "C" fn fi5() {}
ba9703b0 100 | ^^^^^-^^^^^------------------------------
74b04a01
XL
101 | | |
102 | | `async` because of this
103 | `const` because of this
104
105error: functions in `extern` blocks cannot have qualifiers
17df50a5 106 --> $DIR/fn-header-semantic-fail.rs:50:18
74b04a01 107 |
5869c6ff
XL
108LL | extern "C" {
109 | ---------- in this `extern` block
74b04a01 110LL | async fn fe1();
fc512014
XL
111 | ^^^
112 |
113help: remove the qualifiers
114 |
115LL | fn fe1();
94222f64 116 | ~~
74b04a01
XL
117
118error: functions in `extern` blocks cannot have qualifiers
17df50a5 119 --> $DIR/fn-header-semantic-fail.rs:51:19
74b04a01 120 |
5869c6ff
XL
121LL | extern "C" {
122 | ---------- in this `extern` block
74b04a01
XL
123LL | async fn fe1();
124LL | unsafe fn fe2();
fc512014
XL
125 | ^^^
126 |
127help: remove the qualifiers
128 |
129LL | fn fe2();
94222f64 130 | ~~
74b04a01
XL
131
132error: functions in `extern` blocks cannot have qualifiers
17df50a5 133 --> $DIR/fn-header-semantic-fail.rs:52:18
74b04a01 134 |
5869c6ff
XL
135LL | extern "C" {
136 | ---------- in this `extern` block
74b04a01
XL
137...
138LL | const fn fe3();
fc512014
XL
139 | ^^^
140 |
141help: remove the qualifiers
142 |
143LL | fn fe3();
94222f64 144 | ~~
74b04a01
XL
145
146error: functions in `extern` blocks cannot have qualifiers
17df50a5 147 --> $DIR/fn-header-semantic-fail.rs:53:23
74b04a01 148 |
5869c6ff
XL
149LL | extern "C" {
150 | ---------- in this `extern` block
74b04a01
XL
151...
152LL | extern "C" fn fe4();
fc512014
XL
153 | ^^^
154 |
155help: remove the qualifiers
156 |
157LL | fn fe4();
94222f64 158 | ~~
74b04a01
XL
159
160error: functions in `extern` blocks cannot have qualifiers
17df50a5 161 --> $DIR/fn-header-semantic-fail.rs:54:42
74b04a01 162 |
5869c6ff
XL
163LL | extern "C" {
164 | ---------- in this `extern` block
74b04a01
XL
165...
166LL | const async unsafe extern "C" fn fe5();
fc512014
XL
167 | ^^^
168 |
169help: remove the qualifiers
170 |
171LL | fn fe5();
94222f64 172 | ~~
74b04a01
XL
173
174error: functions cannot be both `const` and `async`
17df50a5 175 --> $DIR/fn-header-semantic-fail.rs:54:9
74b04a01
XL
176 |
177LL | const async unsafe extern "C" fn fe5();
ba9703b0 178 | ^^^^^-^^^^^----------------------------
74b04a01
XL
179 | | |
180 | | `async` because of this
181 | `const` because of this
182
183error[E0053]: method `ft1` has an incompatible type for trait
17df50a5 184 --> $DIR/fn-header-semantic-fail.rs:28:24
74b04a01
XL
185 |
186LL | async fn ft1();
187 | - type in trait
188...
189LL | async fn ft1() {}
190 | ^
191 | |
6a06907d 192 | checked the `Output` of this `async fn`, found opaque type
74b04a01
XL
193 | expected `()`, found opaque type
194 |
6a06907d 195 = note: while checking the return type of the `async fn`
74b04a01 196 = note: expected fn pointer `fn()`
3c0e092e 197 found fn pointer `fn() -> impl Future<Output = ()>`
74b04a01
XL
198
199error[E0053]: method `ft5` has an incompatible type for trait
17df50a5 200 --> $DIR/fn-header-semantic-fail.rs:33:48
74b04a01
XL
201 |
202LL | const async unsafe extern "C" fn ft5();
203 | - type in trait
204...
205LL | const async unsafe extern "C" fn ft5() {}
206 | ^
207 | |
6a06907d 208 | checked the `Output` of this `async fn`, found opaque type
74b04a01
XL
209 | expected `()`, found opaque type
210 |
6a06907d 211 = note: while checking the return type of the `async fn`
74b04a01 212 = note: expected fn pointer `unsafe extern "C" fn()`
3c0e092e 213 found fn pointer `unsafe extern "C" fn() -> impl Future<Output = ()>`
74b04a01
XL
214
215error: aborting due to 20 previous errors
216
217Some errors have detailed explanations: E0053, E0379, E0706.
218For more information about an error, try `rustc --explain E0053`.