summaryrefslogtreecommitdiffstats
path: root/compiler/rustc_error_codes/src/error_codes/E0752.md
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/rustc_error_codes/src/error_codes/E0752.md')
-rw-r--r--compiler/rustc_error_codes/src/error_codes/E0752.md19
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(())
+}
+```