We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents b026181 + 0ce97fc commit 1cf79ecCopy full SHA for 1cf79ec
src/librustc_error_codes/error_codes/E0752.md
@@ -1,11 +1,19 @@
1
-`fn main()` or the specified start function is not allowed to be
2
-async. You might be seeing this error because your async runtime
3
-library is not set up correctly.
+The entry point of the program was marked as `async`.
4
5
Erroneous code example:
6
7
```compile_fail,E0752
8
-async fn main() -> Result<i32, ()> {
9
- Ok(1)
+async fn main() -> Result<(), ()> { // error!
+ Ok(())
+}
+```
10
+
11
+`fn main()` or the specified start function is not allowed to be `async`. Not
12
+having a correct async runtime library setup may cause this error. To fix it,
13
+declare the entry point without `async`:
14
15
16
+fn main() -> Result<(), ()> { // ok!
17
18
}
19
```
0 commit comments