Created
November 20, 2021 23:31
-
-
Save compiler-errors/d6f12fb30079feb1ad1d5f1ab39a3a8d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
error[E0601]: `main` function not found in crate `test2` | |
--> /home/michael/test2.rs:1:1 | |
| | |
1 | / fn foo() -> impl std::future::Future<Output = ()> { | |
2 | | async { 1usize } | |
3 | | } | |
| |_^ consider adding a `main` function to `/home/michael/test2.rs` | |
error[E0271]: type mismatch resolving `<impl Future<Output = <[static generator@/home/michael/test2.rs:2:11: 2:21] as Generator<ResumeTy>>::Return> as Future>::Output == ()` | |
--> /home/michael/test2.rs:1:13 | |
| | |
1 | fn foo() -> impl std::future::Future<Output = ()> { | |
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `()`, found `usize` | |
error: aborting due to 2 previous errors | |
Some errors have detailed explanations: E0271, E0601. | |
For more information about an error, try `rustc --explain E0271`. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment