]> git.lizzy.rs Git - rust.git/blobdiff - src/test/ui/impl-trait/issues/issue-78722.stderr
remove [async output] from impl Future
[rust.git] / src / test / ui / impl-trait / issues / issue-78722.stderr
index 975c771759f9ba04bf5fbcd808f0b5fd7f8a7b3a..86bde9a0cddab967e843d72c87f133d05165caef 100644 (file)
@@ -1,22 +1,23 @@
-error[E0658]: `async` blocks are not allowed in constants
+error[E0308]: mismatched types
   --> $DIR/issue-78722.rs:12:20
    |
+LL | type F = impl core::future::Future<Output = u8>;
+   |          -------------------------------------- the expected opaque type
+...
 LL |         let f: F = async { 1 };
-   |                    ^^^^^^^^^^^
+   |                -   ^^^^^^^^^^^ expected opaque type, found a different opaque type
+   |                |
+   |                expected due to this
    |
-   = note: see issue #85368 <https://github.com/rust-lang/rust/issues/85368> for more information
-   = help: add `#![feature(const_async_blocks)]` to the crate attributes to enable
-
-error[E0493]: destructors cannot be evaluated at compile-time
-  --> $DIR/issue-78722.rs:12:13
+  ::: $SRC_DIR/core/src/future/mod.rs:LL:COL
    |
-LL |         let f: F = async { 1 };
-   |             ^ constants cannot evaluate destructors
-...
-LL |     }],
-   |     - value is dropped here
+LL | pub const fn from_generator<T>(gen: T) -> impl Future<Output = T::Return>
+   |                                           ------------------------------- the found opaque type
+   |
+   = note: expected opaque type `impl Future<Output = u8>`
+              found opaque type `impl Future`
+   = note: distinct uses of `impl Trait` result in different opaque types
 
-error: aborting due to 2 previous errors
+error: aborting due to previous error
 
-Some errors have detailed explanations: E0493, E0658.
-For more information about an error, try `rustc --explain E0493`.
+For more information about this error, try `rustc --explain E0308`.