]> git.proxmox.com Git - rustc.git/blame - tests/ui/parser/fn-header-semantic-fail.stderr
New upstream version 1.70.0+dfsg1
[rustc.git] / tests / 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 3 |
5e7ed085 4LL | const async unsafe extern "C" fn ff5() {}
ba9703b0 5 | ^^^^^-^^^^^------------------------------
74b04a01
XL
6 | | |
7 | | `async` because of this
8 | `const` because of this
9
74b04a01 10error[E0379]: functions in traits cannot be declared const
353b0b11 11 --> $DIR/fn-header-semantic-fail.rs:18:9
74b04a01
XL
12 |
13LL | const fn ft3();
14 | ^^^^^ functions in traits cannot be const
15
16error[E0379]: functions in traits cannot be declared const
353b0b11 17 --> $DIR/fn-header-semantic-fail.rs:20:9
74b04a01
XL
18 |
19LL | const async unsafe extern "C" fn ft5();
20 | ^^^^^ functions in traits cannot be const
21
74b04a01 22error: functions cannot be both `const` and `async`
353b0b11 23 --> $DIR/fn-header-semantic-fail.rs:20:9
74b04a01
XL
24 |
25LL | const async unsafe extern "C" fn ft5();
ba9703b0 26 | ^^^^^-^^^^^----------------------------
74b04a01
XL
27 | | |
28 | | `async` because of this
29 | `const` because of this
30
74b04a01 31error[E0379]: functions in traits cannot be declared const
353b0b11 32 --> $DIR/fn-header-semantic-fail.rs:30:9
74b04a01
XL
33 |
34LL | const fn ft3() {}
35 | ^^^^^ functions in traits cannot be const
36
37error[E0379]: functions in traits cannot be declared const
353b0b11 38 --> $DIR/fn-header-semantic-fail.rs:32:9
74b04a01
XL
39 |
40LL | const async unsafe extern "C" fn ft5() {}
41 | ^^^^^ functions in traits cannot be const
42
74b04a01 43error: functions cannot be both `const` and `async`
353b0b11 44 --> $DIR/fn-header-semantic-fail.rs:32:9
74b04a01
XL
45 |
46LL | const async unsafe extern "C" fn ft5() {}
ba9703b0 47 | ^^^^^-^^^^^------------------------------
74b04a01
XL
48 | | |
49 | | `async` because of this
50 | `const` because of this
51
52error: functions cannot be both `const` and `async`
353b0b11 53 --> $DIR/fn-header-semantic-fail.rs:43:9
74b04a01
XL
54 |
55LL | const async unsafe extern "C" fn fi5() {}
ba9703b0 56 | ^^^^^-^^^^^------------------------------
74b04a01
XL
57 | | |
58 | | `async` because of this
59 | `const` because of this
60
61error: functions in `extern` blocks cannot have qualifiers
353b0b11 62 --> $DIR/fn-header-semantic-fail.rs:48:18
74b04a01 63 |
5869c6ff
XL
64LL | extern "C" {
65 | ---------- in this `extern` block
74b04a01 66LL | async fn fe1();
fc512014
XL
67 | ^^^
68 |
69help: remove the qualifiers
70 |
71LL | fn fe1();
94222f64 72 | ~~
74b04a01
XL
73
74error: functions in `extern` blocks cannot have qualifiers
353b0b11 75 --> $DIR/fn-header-semantic-fail.rs:49:19
74b04a01 76 |
5869c6ff
XL
77LL | extern "C" {
78 | ---------- in this `extern` block
74b04a01
XL
79LL | async fn fe1();
80LL | unsafe fn fe2();
fc512014
XL
81 | ^^^
82 |
83help: remove the qualifiers
84 |
85LL | fn fe2();
94222f64 86 | ~~
74b04a01
XL
87
88error: functions in `extern` blocks cannot have qualifiers
353b0b11 89 --> $DIR/fn-header-semantic-fail.rs:50:18
74b04a01 90 |
5869c6ff
XL
91LL | extern "C" {
92 | ---------- in this `extern` block
74b04a01
XL
93...
94LL | const fn fe3();
fc512014
XL
95 | ^^^
96 |
97help: remove the qualifiers
98 |
99LL | fn fe3();
94222f64 100 | ~~
74b04a01
XL
101
102error: functions in `extern` blocks cannot have qualifiers
353b0b11 103 --> $DIR/fn-header-semantic-fail.rs:51:23
74b04a01 104 |
5869c6ff
XL
105LL | extern "C" {
106 | ---------- in this `extern` block
74b04a01
XL
107...
108LL | extern "C" fn fe4();
fc512014
XL
109 | ^^^
110 |
111help: remove the qualifiers
112 |
113LL | fn fe4();
94222f64 114 | ~~
74b04a01
XL
115
116error: functions in `extern` blocks cannot have qualifiers
353b0b11 117 --> $DIR/fn-header-semantic-fail.rs:52:42
74b04a01 118 |
5869c6ff
XL
119LL | extern "C" {
120 | ---------- in this `extern` block
74b04a01
XL
121...
122LL | const async unsafe extern "C" fn fe5();
fc512014
XL
123 | ^^^
124 |
125help: remove the qualifiers
126 |
127LL | fn fe5();
94222f64 128 | ~~
74b04a01
XL
129
130error: functions cannot be both `const` and `async`
353b0b11 131 --> $DIR/fn-header-semantic-fail.rs:52:9
74b04a01
XL
132 |
133LL | const async unsafe extern "C" fn fe5();
ba9703b0 134 | ^^^^^-^^^^^----------------------------
74b04a01
XL
135 | | |
136 | | `async` because of this
137 | `const` because of this
138
f2b60f7d 139error[E0706]: functions in traits cannot be declared `async`
353b0b11 140 --> $DIR/fn-header-semantic-fail.rs:16:9
f2b60f7d
FG
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
2b03887a 150 = help: add `#![feature(async_fn_in_trait)]` to the crate attributes to enable
f2b60f7d
FG
151
152error[E0706]: functions in traits cannot be declared `async`
353b0b11 153 --> $DIR/fn-header-semantic-fail.rs:20:9
f2b60f7d
FG
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
2b03887a 163 = help: add `#![feature(async_fn_in_trait)]` to the crate attributes to enable
f2b60f7d
FG
164
165error[E0706]: functions in traits cannot be declared `async`
353b0b11 166 --> $DIR/fn-header-semantic-fail.rs:28:9
f2b60f7d
FG
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
2b03887a 176 = help: add `#![feature(async_fn_in_trait)]` to the crate attributes to enable
f2b60f7d
FG
177
178error[E0706]: functions in traits cannot be declared `async`
353b0b11 179 --> $DIR/fn-header-semantic-fail.rs:32:9
f2b60f7d
FG
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
2b03887a 189 = help: add `#![feature(async_fn_in_trait)]` to the crate attributes to enable
f2b60f7d 190
353b0b11 191error: aborting due to 18 previous errors
74b04a01 192
353b0b11 193Some errors have detailed explanations: E0379, E0706.
f2b60f7d 194For more information about an error, try `rustc --explain E0379`.