summaryrefslogtreecommitdiffstats
path: root/src/test/ui/async-await/no-const-async.stderr
blob: c5bd520aaea0d98c95938cb75ceb05288cdc19cc (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
error: functions cannot be both `const` and `async`
  --> $DIR/no-const-async.rs:4:5
   |
LL | pub const async fn x() {}
   | ----^^^^^-^^^^^----------
   |     |     |
   |     |     `async` because of this
   |     `const` because of this

error[E0391]: cycle detected when computing type of `x::{opaque#0}`
  --> $DIR/no-const-async.rs:4:24
   |
LL | pub const async fn x() {}
   |                        ^
   |
note: ...which requires borrow-checking `x`...
  --> $DIR/no-const-async.rs:4:1
   |
LL | pub const async fn x() {}
   | ^^^^^^^^^^^^^^^^^^^^^^
note: ...which requires processing MIR for `x`...
  --> $DIR/no-const-async.rs:4:1
   |
LL | pub const async fn x() {}
   | ^^^^^^^^^^^^^^^^^^^^^^
note: ...which requires const checking `x`...
  --> $DIR/no-const-async.rs:4:1
   |
LL | pub const async fn x() {}
   | ^^^^^^^^^^^^^^^^^^^^^^
   = note: ...which requires computing whether `impl core::future::future::Future<Output = ()>` is freeze...
   = note: ...which requires evaluating trait selection obligation `impl core::future::future::Future<Output = ()>: core::marker::Freeze`...
   = note: ...which again requires computing type of `x::{opaque#0}`, completing the cycle
note: cycle used when checking item types in top-level module
  --> $DIR/no-const-async.rs:4:1
   |
LL | pub const async fn x() {}
   | ^^^^^^^^^^^^^^^^^^^^^^^^^

error: aborting due to 2 previous errors

For more information about this error, try `rustc --explain E0391`.