diff options
Diffstat (limited to '')
-rw-r--r-- | compiler/rustc_error_codes/src/error_codes/E0752.md | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/compiler/rustc_error_codes/src/error_codes/E0752.md b/compiler/rustc_error_codes/src/error_codes/E0752.md new file mode 100644 index 000000000..9736da80c --- /dev/null +++ b/compiler/rustc_error_codes/src/error_codes/E0752.md @@ -0,0 +1,19 @@ +The entry point of the program was marked as `async`. + +Erroneous code example: + +```compile_fail,E0752 +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(()) +} +``` |