diff options
| author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2020-08-13 13:07:27 +0200 |
|---|---|---|
| committer | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2020-08-13 13:07:27 +0200 |
| commit | bbad31df2f0661976814832786a6067e4bc255f1 (patch) | |
| tree | 244a1e8a939a66d9fec289f93fb1e88d501cb93e /src/librustc_error_codes/error_codes | |
| parent | 441fd2255763c2aeea616aeac61b2c795a4c5330 (diff) | |
| download | rust-bbad31df2f0661976814832786a6067e4bc255f1.tar.gz rust-bbad31df2f0661976814832786a6067e4bc255f1.zip | |
Clean up E0752 explanation
Diffstat (limited to 'src/librustc_error_codes/error_codes')
| -rw-r--r-- | src/librustc_error_codes/error_codes/E0752.md | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/src/librustc_error_codes/error_codes/E0752.md b/src/librustc_error_codes/error_codes/E0752.md index 86945f83b55..77512fddcf6 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<i32, ()> { +async fn main() -> Result<i32, ()> { // 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<i32, ()> { // ok! Ok(1) } ``` |
