Guest User

Untitled

a guest
Aug 15th, 2018
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. #![allow(unreachable_code)]
  2.  
  3.  
  4. fn main() {
  5. println!("{:?}", {
  6. if 1 == 1 || 1/0 == 0 { println!("haha"); }
  7. });
  8. }
  9.  
  10.  
  11. /* ~~~~=== stderr ===~~~~
  12. Compiling playground v0.0.1 (file:///playground)
  13. error: attempt to divide by zero
  14. --> src/main.rs:6:22
  15. |
  16. 6 | if 1 == 1 || 1/0 == 0 { println!("haha"); }
  17. | ^^^
  18. |
  19. = note: #[deny(const_err)] on by default
  20.  
  21. error: this expression will panic at runtime
  22. --> src/main.rs:6:22
  23. |
  24. 6 | if 1 == 1 || 1/0 == 0 { println!("haha"); }
  25. | ^^^ attempt to divide by zero
  26.  
  27. error: aborting due to 2 previous errors
  28.  
  29. error: Could not compile `playground`.
  30.  
  31. To learn more, run the command again with --verbose.
  32.  
  33. */
  34.  
  35. /* ~~~~=== stdout ===~~~~
  36.  
  37. */
Add Comment
Please, Sign In to add comment