Guest User

Untitled

a guest
Jul 15th, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | None | 0 0
  1. #![feature(catch_expr)]
  2.  
  3. fn main() {
  4. println!("{:?}", {
  5. let x = Some(2); let y = Some(3); let z: Option<_> = do catch { x? + y? }
  6. });
  7. }
  8.  
  9.  
  10. /* ~~~~=== stderr ===~~~~
  11. Compiling playground v0.0.1 (file:///playground)
  12. error: expected one of `.`, `;`, `?`, or an operator, found `}`
  13. --> src/main.rs:6:5
  14. |
  15. 5 | let x = Some(2); let y = Some(3); let z: Option<_> = do catch { x? + y? }
  16. | - expected one of `.`, `;`, `?`, or an operator here
  17. 6 | });
  18. | ^ unexpected token
  19.  
  20. error: aborting due to previous error
  21.  
  22. error: Could not compile `playground`.
  23.  
  24. To learn more, run the command again with --verbose.
  25.  
  26. */
  27.  
  28. /* ~~~~=== stdout ===~~~~
  29.  
  30. */
Add Comment
Please, Sign In to add comment