Guest User

Untitled

a guest
Feb 17th, 2019
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. #![allow(unreachable_code)]
  2.  
  3.  
  4. fn main() {
  5. println!("{:?}", {
  6. let x = 4; &[0, 1, 2, 3][x-10..]
  7. });
  8. }
  9.  
  10.  
  11. /* ~~~~=== stderr ===~~~~
  12. Compiling playground v0.0.1 (/playground)
  13. Finished release [optimized] target(s) in 0.58s
  14. Running `target/release/playground`
  15. thread 'main' panicked at 'slice index starts at 18446744073709551610 but ends at 4', src/libcore/slice/mod.rs:2355:5
  16. note: Run with `RUST_BACKTRACE=1` for a backtrace.
  17.  
  18. */
  19.  
  20. /* ~~~~=== stdout ===~~~~
  21.  
  22. */
Add Comment
Please, Sign In to add comment