]> git.lizzy.rs Git - rust.git/commitdiff
Fix code examples
authorGuillaume Gomez <guillaume1.gomez@gmail.com>
Thu, 13 Aug 2020 19:07:56 +0000 (21:07 +0200)
committerGuillaume Gomez <guillaume1.gomez@gmail.com>
Thu, 13 Aug 2020 19:07:56 +0000 (21:07 +0200)
src/librustc_error_codes/error_codes/E0752.md

index d79ad06bee095cc92c250008f6f1bb8631125830..9736da80c2b7b178396f85e680e7ff358a15215c 100644 (file)
@@ -3,8 +3,8 @@ The entry point of the program was marked as `async`.
 Erroneous code example:
 
 ```compile_fail,E0752
-async fn main() -> Result<i32, ()> { // error!
-    Ok(1)
+async fn main() -> Result<(), ()> { // error!
+    Ok(())
 }
 ```
 
@@ -13,7 +13,7 @@ having a correct async runtime library setup may cause this error. To fix it,
 declare the entry point without `async`:
 
 ```
-fn main() -> Result<i32, ()> { // ok!
-    Ok(1)
+fn main() -> Result<(), ()> { // ok!
+    Ok(())
 }
 ```