rust/src/test/ui/async-await/issue-68523.rs
Sebastian Malton 6120acec87 Check that main/start is not async
* Add new error code E0752
* Add span to hir::IsAsync::Yes
* Emit an error if main or the start function is marked as async
* Add two regression tests

Fix formatting errors and bless test outputs
* move tests to ui/async-await

fix test error text

remove span from IsAsync
2020-04-20 09:37:11 -04:00

8 lines
192 B
Rust

// edition:2018
async fn main() -> Result<i32, ()> {
//~^ ERROR `main` function is not allowed to be `async`
//~^^ ERROR `main` has invalid return type `impl std::future::Future`
Ok(1)
}