Advertisement
Guest User

Untitled

a guest
May 21st, 2019
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.88 KB | None | 0 0
  1. #![allow(unreachable_code)]
  2.  
  3.  
  4. fn main() {
  5. println!("{:?}", {
  6. let x = panic!(); let y = panic!(); x == y
  7. });
  8. }
  9.  
  10.  
  11. /* ~~~~=== stderr ===~~~~
  12. Compiling playground v0.0.1 (/playground)
  13. warning: unused variable: `x`
  14. --> src/main.rs:6:13
  15. |
  16. 6 | let x = panic!(); let y = panic!(); x == y
  17. | ^ help: consider prefixing with an underscore: `_x`
  18. |
  19. = note: #[warn(unused_variables)] on by default
  20.  
  21. warning: unused variable: `y`
  22. --> src/main.rs:6:31
  23. |
  24. 6 | let x = panic!(); let y = panic!(); x == y
  25. | ^ help: consider prefixing with an underscore: `_y`
  26.  
  27. Finished dev [unoptimized + debuginfo] target(s) in 0.53s
  28. Running `target/debug/playground`
  29. thread 'main' panicked at 'explicit panic', src/main.rs:6:17
  30. note: Run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
  31.  
  32. */
  33.  
  34. /* ~~~~=== stdout ===~~~~
  35.  
  36. */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement