W3cubDocs

/Rust

Error code E0752

The entry point of the program was marked as async.

Erroneous code example:

async fn main() -> Result<(), ()> { // error!
    Ok(())
}

fn main() or the specified start function is not allowed to be async. Not having a correct async runtime library setup may cause this error. To fix it, declare the entry point without async:

fn main() -> Result<(), ()> { // ok!
    Ok(())
}

© 2010 The Rust Project Developers
Licensed under the Apache License, Version 2.0 or the MIT license, at your option.
https://doc.rust-lang.org/error_codes/E0752.html