Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #![feature(catch_expr)]
- fn main() {
- println!("{:?}", {
- let x = Some(2); let y = Some(3); let z: Option<_> = do catch { x? + y? }
- });
- }
- /* ~~~~=== stderr ===~~~~
- Compiling playground v0.0.1 (file:///playground)
- error: expected one of `.`, `;`, `?`, or an operator, found `}`
- --> src/main.rs:6:5
- |
- 5 | let x = Some(2); let y = Some(3); let z: Option<_> = do catch { x? + y? }
- | - expected one of `.`, `;`, `?`, or an operator here
- 6 | });
- | ^ unexpected token
- error: aborting due to previous error
- error: Could not compile `playground`.
- To learn more, run the command again with --verbose.
- */
- /* ~~~~=== stdout ===~~~~
- */
Add Comment
Please, Sign In to add comment