]> git.proxmox.com Git - rustc.git/blobdiff - src/test/ui/async-await/no-const-async.stderr
New upstream version 1.61.0+dfsg1
[rustc.git] / src / test / ui / async-await / no-const-async.stderr
index 90ec646c8c09cbb6a8e9477fdbb830e8ee313f6e..fd76c282f9629c475253bc0197f6cd699999489b 100644 (file)
@@ -7,5 +7,36 @@ LL | pub const async fn x() {}
    |     |     `async` because of this
    |     `const` because of this
 
-error: aborting due to previous error
+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 `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`.