File tree Expand file tree Collapse file tree 1 file changed +12
-4
lines changed
src/librustc_error_codes/error_codes Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Original file line number Diff line number Diff line change 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.
1+ The entry point of the program was marked as ` async ` .
42
53Erroneous code example:
64
75``` compile_fail,E0752
8- async fn main() -> Result<i32, ()> {
6+ async fn main() -> Result<i32, ()> { // error!
7+ Ok(1)
8+ }
9+ ```
10+
11+ ` fn main() ` or the specified start function is not allowed to be ` async ` . You
12+ might be seeing this error because your async runtime library is not set up
13+ correctly. To fix it, don't declare the entry point as ` async ` :
14+
15+ ```
16+ fn main() -> Result<i32, ()> { // ok!
917 Ok(1)
1018}
1119```
You can’t perform that action at this time.
0 commit comments