fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
6.3 KiB194 linesraw
1error: functions cannot be both `const` and `async`
2  --> $DIR/fn-header-semantic-fail.rs:12:5
3   |
4LL |     const async unsafe extern "C" fn ff5() {}
5   |     ^^^^^-^^^^^------------------------------
6   |     |     |
7   |     |     `async` because of this
8   |     `const` because of this
9
10error[E0379]: functions in traits cannot be declared const
11  --> $DIR/fn-header-semantic-fail.rs:18:9
12   |
13LL |         const fn ft3();
14   |         ^^^^^ functions in traits cannot be const
15
16error[E0379]: functions in traits cannot be declared const
17  --> $DIR/fn-header-semantic-fail.rs:20:9
18   |
19LL |         const async unsafe extern "C" fn ft5();
20   |         ^^^^^ functions in traits cannot be const
21
22error: functions cannot be both `const` and `async`
23  --> $DIR/fn-header-semantic-fail.rs:20:9
24   |
25LL |         const async unsafe extern "C" fn ft5();
26   |         ^^^^^-^^^^^----------------------------
27   |         |     |
28   |         |     `async` because of this
29   |         `const` because of this
30
31error[E0379]: functions in traits cannot be declared const
32  --> $DIR/fn-header-semantic-fail.rs:30:9
33   |
34LL |         const fn ft3() {}
35   |         ^^^^^ functions in traits cannot be const
36
37error[E0379]: functions in traits cannot be declared const
38  --> $DIR/fn-header-semantic-fail.rs:32:9
39   |
40LL |         const async unsafe extern "C" fn ft5() {}
41   |         ^^^^^ functions in traits cannot be const
42
43error: functions cannot be both `const` and `async`
44  --> $DIR/fn-header-semantic-fail.rs:32:9
45   |
46LL |         const async unsafe extern "C" fn ft5() {}
47   |         ^^^^^-^^^^^------------------------------
48   |         |     |
49   |         |     `async` because of this
50   |         `const` because of this
51
52error: functions cannot be both `const` and `async`
53  --> $DIR/fn-header-semantic-fail.rs:43:9
54   |
55LL |         const async unsafe extern "C" fn fi5() {}
56   |         ^^^^^-^^^^^------------------------------
57   |         |     |
58   |         |     `async` because of this
59   |         `const` because of this
60
61error: functions in `extern` blocks cannot have qualifiers
62  --> $DIR/fn-header-semantic-fail.rs:48:18
63   |
64LL |     extern "C" {
65   |     ---------- in this `extern` block
66LL |         async fn fe1();
67   |                  ^^^
68   |
69help: remove the qualifiers
70   |
71LL |         fn fe1();
72   |         ~~
73
74error: functions in `extern` blocks cannot have qualifiers
75  --> $DIR/fn-header-semantic-fail.rs:49:19
76   |
77LL |     extern "C" {
78   |     ---------- in this `extern` block
79LL |         async fn fe1();
80LL |         unsafe fn fe2();
81   |                   ^^^
82   |
83help: remove the qualifiers
84   |
85LL |         fn fe2();
86   |         ~~
87
88error: functions in `extern` blocks cannot have qualifiers
89  --> $DIR/fn-header-semantic-fail.rs:50:18
90   |
91LL |     extern "C" {
92   |     ---------- in this `extern` block
93...
94LL |         const fn fe3();
95   |                  ^^^
96   |
97help: remove the qualifiers
98   |
99LL |         fn fe3();
100   |         ~~
101
102error: functions in `extern` blocks cannot have qualifiers
103  --> $DIR/fn-header-semantic-fail.rs:51:23
104   |
105LL |     extern "C" {
106   |     ---------- in this `extern` block
107...
108LL |         extern "C" fn fe4();
109   |                       ^^^
110   |
111help: remove the qualifiers
112   |
113LL |         fn fe4();
114   |         ~~
115
116error: functions in `extern` blocks cannot have qualifiers
117  --> $DIR/fn-header-semantic-fail.rs:52:42
118   |
119LL |     extern "C" {
120   |     ---------- in this `extern` block
121...
122LL |         const async unsafe extern "C" fn fe5();
123   |                                          ^^^
124   |
125help: remove the qualifiers
126   |
127LL |         fn fe5();
128   |         ~~
129
130error: functions cannot be both `const` and `async`
131  --> $DIR/fn-header-semantic-fail.rs:52:9
132   |
133LL |         const async unsafe extern "C" fn fe5();
134   |         ^^^^^-^^^^^----------------------------
135   |         |     |
136   |         |     `async` because of this
137   |         `const` because of this
138
139error[E0706]: functions in traits cannot be declared `async`
140  --> $DIR/fn-header-semantic-fail.rs:16:9
141   |
142LL |         async fn ft1();
143   |         -----^^^^^^^^^^
144   |         |
145   |         `async` because of this
146   |
147   = note: `async` trait functions are not currently supported
148   = note: consider using the `async-trait` crate: https://crates.io/crates/async-trait
149   = note: see issue #91611 <https://github.com/rust-lang/rust/issues/91611> for more information
150   = help: add `#![feature(async_fn_in_trait)]` to the crate attributes to enable
151
152error[E0706]: functions in traits cannot be declared `async`
153  --> $DIR/fn-header-semantic-fail.rs:20:9
154   |
155LL |         const async unsafe extern "C" fn ft5();
156   |         ^^^^^^-----^^^^^^^^^^^^^^^^^^^^^^^^^^^^
157   |               |
158   |               `async` because of this
159   |
160   = note: `async` trait functions are not currently supported
161   = note: consider using the `async-trait` crate: https://crates.io/crates/async-trait
162   = note: see issue #91611 <https://github.com/rust-lang/rust/issues/91611> for more information
163   = help: add `#![feature(async_fn_in_trait)]` to the crate attributes to enable
164
165error[E0706]: functions in traits cannot be declared `async`
166  --> $DIR/fn-header-semantic-fail.rs:28:9
167   |
168LL |         async fn ft1() {}
169   |         -----^^^^^^^^^
170   |         |
171   |         `async` because of this
172   |
173   = note: `async` trait functions are not currently supported
174   = note: consider using the `async-trait` crate: https://crates.io/crates/async-trait
175   = note: see issue #91611 <https://github.com/rust-lang/rust/issues/91611> for more information
176   = help: add `#![feature(async_fn_in_trait)]` to the crate attributes to enable
177
178error[E0706]: functions in traits cannot be declared `async`
179  --> $DIR/fn-header-semantic-fail.rs:32:9
180   |
181LL |         const async unsafe extern "C" fn ft5() {}
182   |         ^^^^^^-----^^^^^^^^^^^^^^^^^^^^^^^^^^^
183   |               |
184   |               `async` because of this
185   |
186   = note: `async` trait functions are not currently supported
187   = note: consider using the `async-trait` crate: https://crates.io/crates/async-trait
188   = note: see issue #91611 <https://github.com/rust-lang/rust/issues/91611> for more information
189   = help: add `#![feature(async_fn_in_trait)]` to the crate attributes to enable
190
191error: aborting due to 18 previous errors
192
193Some errors have detailed explanations: E0379, E0706.
194For more information about an error, try `rustc --explain E0379`.