mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-24 07:44:10 +00:00
Fix code examples
This commit is contained in:
parent
406719bf24
commit
0ce97fc511
@ -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(())
|
||||
}
|
||||
```
|
||||
|
Loading…
Reference in New Issue
Block a user