We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent aeb2353 commit c88efe4Copy full SHA for c88efe4
src/doc/unstable-book/src/language-features/catch-expr.md
@@ -15,16 +15,16 @@ expression creates a new scope one can use the `?` operator in.
15
use std::num::ParseIntError;
16
17
let result: Result<i32, ParseIntError> = do catch {
18
- Ok("1".parse::<i32>()?
+ "1".parse::<i32>()?
19
+ "2".parse::<i32>()?
20
- + "3".parse::<i32>()?)
+ + "3".parse::<i32>()?
21
};
22
assert_eq!(result, Ok(6));
23
24
25
26
+ "foo".parse::<i32>()?
27
28
29
assert!(result.is_err());
30
```
0 commit comments