diff --git a/src/librustc_error_codes/error_codes/E0752.md b/src/librustc_error_codes/error_codes/E0752.md index 86945f83b552..77512fddcf63 100644 --- a/src/librustc_error_codes/error_codes/E0752.md +++ b/src/librustc_error_codes/error_codes/E0752.md @@ -1,11 +1,19 @@ -`fn main()` or the specified start function is not allowed to be -async. You might be seeing this error because your async runtime -library is not set up correctly. +The entry point of the program was marked as `async`. Erroneous code example: ```compile_fail,E0752 -async fn main() -> Result { +async fn main() -> Result { // error! + Ok(1) +} +``` + +`fn main()` or the specified start function is not allowed to be `async`. You +might be seeing this error because your async runtime library is not set up +correctly. To fix it, don't declare the entry point as `async`: + +``` +fn main() -> Result { // ok! Ok(1) } ```