]> git.proxmox.com Git - rustc.git/blame - tests/ui/async-await/no-const-async.stderr
New upstream version 1.69.0+dfsg1
[rustc.git] / tests / ui / async-await / no-const-async.stderr
CommitLineData
74b04a01 1error: functions cannot be both `const` and `async`
ba9703b0 2 --> $DIR/no-const-async.rs:4:5
dc9dc135
XL
3 |
4LL | pub const async fn x() {}
ba9703b0 5 | ----^^^^^-^^^^^----------
74b04a01
XL
6 | | |
7 | | `async` because of this
8 | `const` because of this
dc9dc135 9
5e7ed085
FG
10error[E0391]: cycle detected when computing type of `x::{opaque#0}`
11 --> $DIR/no-const-async.rs:4:24
12 |
13LL | pub const async fn x() {}
14 | ^
15 |
16note: ...which requires borrow-checking `x`...
17 --> $DIR/no-const-async.rs:4:1
18 |
19LL | pub const async fn x() {}
20 | ^^^^^^^^^^^^^^^^^^^^^^
2b03887a 21note: ...which requires processing MIR for `x`...
5e7ed085
FG
22 --> $DIR/no-const-async.rs:4:1
23 |
24LL | pub const async fn x() {}
25 | ^^^^^^^^^^^^^^^^^^^^^^
26note: ...which requires const checking `x`...
27 --> $DIR/no-const-async.rs:4:1
28 |
29LL | pub const async fn x() {}
30 | ^^^^^^^^^^^^^^^^^^^^^^
9ffffee4
FG
31 = note: ...which requires computing whether `x::{opaque#0}` is freeze...
32 = note: ...which requires evaluating trait selection obligation `x::{opaque#0}: core::marker::Freeze`...
5e7ed085
FG
33 = note: ...which again requires computing type of `x::{opaque#0}`, completing the cycle
34note: cycle used when checking item types in top-level module
35 --> $DIR/no-const-async.rs:4:1
36 |
37LL | pub const async fn x() {}
064997fb 38 | ^^^^^^^^^^^^^^^^^^^^^^^^^
5e7ed085
FG
39
40error: aborting due to 2 previous errors
dc9dc135 41
5e7ed085 42For more information about this error, try `rustc --explain E0391`.