Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #![allow(unreachable_code)]
- fn main() {
- println!("{:?}", {
- if 1 == 1 || 1/0 == 0 { println!("haha"); }
- });
- }
- /* ~~~~=== stderr ===~~~~
- Compiling playground v0.0.1 (file:///playground)
- error: attempt to divide by zero
- --> src/main.rs:6:22
- |
- 6 | if 1 == 1 || 1/0 == 0 { println!("haha"); }
- | ^^^
- |
- = note: #[deny(const_err)] on by default
- error: this expression will panic at runtime
- --> src/main.rs:6:22
- |
- 6 | if 1 == 1 || 1/0 == 0 { println!("haha"); }
- | ^^^ attempt to divide by zero
- error: aborting due to 2 previous errors
- error: Could not compile `playground`.
- To learn more, run the command again with --verbose.
- */
- /* ~~~~=== stdout ===~~~~
- */
Add Comment
Please, Sign In to add comment