summaryrefslogtreecommitdiffstats
path: root/tests/ui/parser/fn-header-semantic-fail.stderr
blob: 7f7b7e835f82405e857806ea7c10e4190e76928f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
error: functions cannot be both `const` and `async`
  --> $DIR/fn-header-semantic-fail.rs:12:5
   |
LL |     const async unsafe extern "C" fn ff5() {}
   |     ^^^^^-^^^^^------------------------------
   |     |     |
   |     |     `async` because of this
   |     `const` because of this

error[E0379]: functions in traits cannot be declared const
  --> $DIR/fn-header-semantic-fail.rs:18:9
   |
LL |         const fn ft3();
   |         ^^^^^ functions in traits cannot be const

error[E0379]: functions in traits cannot be declared const
  --> $DIR/fn-header-semantic-fail.rs:20:9
   |
LL |         const async unsafe extern "C" fn ft5();
   |         ^^^^^ functions in traits cannot be const

error: functions cannot be both `const` and `async`
  --> $DIR/fn-header-semantic-fail.rs:20:9
   |
LL |         const async unsafe extern "C" fn ft5();
   |         ^^^^^-^^^^^----------------------------
   |         |     |
   |         |     `async` because of this
   |         `const` because of this

error[E0379]: functions in traits cannot be declared const
  --> $DIR/fn-header-semantic-fail.rs:30:9
   |
LL |         const fn ft3() {}
   |         ^^^^^ functions in traits cannot be const

error[E0379]: functions in traits cannot be declared const
  --> $DIR/fn-header-semantic-fail.rs:32:9
   |
LL |         const async unsafe extern "C" fn ft5() {}
   |         ^^^^^ functions in traits cannot be const

error: functions cannot be both `const` and `async`
  --> $DIR/fn-header-semantic-fail.rs:32:9
   |
LL |         const async unsafe extern "C" fn ft5() {}
   |         ^^^^^-^^^^^------------------------------
   |         |     |
   |         |     `async` because of this
   |         `const` because of this

error: functions cannot be both `const` and `async`
  --> $DIR/fn-header-semantic-fail.rs:43:9
   |
LL |         const async unsafe extern "C" fn fi5() {}
   |         ^^^^^-^^^^^------------------------------
   |         |     |
   |         |     `async` because of this
   |         `const` because of this

error: functions in `extern` blocks cannot have qualifiers
  --> $DIR/fn-header-semantic-fail.rs:48:18
   |
LL |     extern "C" {
   |     ---------- in this `extern` block
LL |         async fn fe1();
   |                  ^^^
   |
help: remove the qualifiers
   |
LL |         fn fe1();
   |         ~~

error: functions in `extern` blocks cannot have qualifiers
  --> $DIR/fn-header-semantic-fail.rs:49:19
   |
LL |     extern "C" {
   |     ---------- in this `extern` block
LL |         async fn fe1();
LL |         unsafe fn fe2();
   |                   ^^^
   |
help: remove the qualifiers
   |
LL |         fn fe2();
   |         ~~

error: functions in `extern` blocks cannot have qualifiers
  --> $DIR/fn-header-semantic-fail.rs:50:18
   |
LL |     extern "C" {
   |     ---------- in this `extern` block
...
LL |         const fn fe3();
   |                  ^^^
   |
help: remove the qualifiers
   |
LL |         fn fe3();
   |         ~~

error: functions in `extern` blocks cannot have qualifiers
  --> $DIR/fn-header-semantic-fail.rs:51:23
   |
LL |     extern "C" {
   |     ---------- in this `extern` block
...
LL |         extern "C" fn fe4();
   |                       ^^^
   |
help: remove the qualifiers
   |
LL |         fn fe4();
   |         ~~

error: functions in `extern` blocks cannot have qualifiers
  --> $DIR/fn-header-semantic-fail.rs:52:42
   |
LL |     extern "C" {
   |     ---------- in this `extern` block
...
LL |         const async unsafe extern "C" fn fe5();
   |                                          ^^^
   |
help: remove the qualifiers
   |
LL |         fn fe5();
   |         ~~

error: functions cannot be both `const` and `async`
  --> $DIR/fn-header-semantic-fail.rs:52:9
   |
LL |         const async unsafe extern "C" fn fe5();
   |         ^^^^^-^^^^^----------------------------
   |         |     |
   |         |     `async` because of this
   |         `const` because of this

error[E0706]: functions in traits cannot be declared `async`
  --> $DIR/fn-header-semantic-fail.rs:16:9
   |
LL |         async fn ft1();
   |         -----^^^^^^^^^^
   |         |
   |         `async` because of this
   |
   = note: `async` trait functions are not currently supported
   = note: consider using the `async-trait` crate: https://crates.io/crates/async-trait
   = note: see issue #91611 <https://github.com/rust-lang/rust/issues/91611> for more information
   = help: add `#![feature(async_fn_in_trait)]` to the crate attributes to enable

error[E0706]: functions in traits cannot be declared `async`
  --> $DIR/fn-header-semantic-fail.rs:20:9
   |
LL |         const async unsafe extern "C" fn ft5();
   |         ^^^^^^-----^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |               |
   |               `async` because of this
   |
   = note: `async` trait functions are not currently supported
   = note: consider using the `async-trait` crate: https://crates.io/crates/async-trait
   = note: see issue #91611 <https://github.com/rust-lang/rust/issues/91611> for more information
   = help: add `#![feature(async_fn_in_trait)]` to the crate attributes to enable

error[E0706]: functions in traits cannot be declared `async`
  --> $DIR/fn-header-semantic-fail.rs:28:9
   |
LL |         async fn ft1() {}
   |         -----^^^^^^^^^
   |         |
   |         `async` because of this
   |
   = note: `async` trait functions are not currently supported
   = note: consider using the `async-trait` crate: https://crates.io/crates/async-trait
   = note: see issue #91611 <https://github.com/rust-lang/rust/issues/91611> for more information
   = help: add `#![feature(async_fn_in_trait)]` to the crate attributes to enable

error[E0706]: functions in traits cannot be declared `async`
  --> $DIR/fn-header-semantic-fail.rs:32:9
   |
LL |         const async unsafe extern "C" fn ft5() {}
   |         ^^^^^^-----^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |               |
   |               `async` because of this
   |
   = note: `async` trait functions are not currently supported
   = note: consider using the `async-trait` crate: https://crates.io/crates/async-trait
   = note: see issue #91611 <https://github.com/rust-lang/rust/issues/91611> for more information
   = help: add `#![feature(async_fn_in_trait)]` to the crate attributes to enable

error: aborting due to 18 previous errors

Some errors have detailed explanations: E0379, E0706.
For more information about an error, try `rustc --explain E0379`.