Advertisement
Guest User

Untitled

a guest
Jul 24th, 2019
87
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. &"a"[..10]
  7. });
  8. }
  9.  
  10.  
  11. /* ~~~~=== stderr ===~~~~
  12. Compiling playground v0.0.1 (/playground)
  13. Finished dev [unoptimized + debuginfo] target(s) in 0.39s
  14. Running `target/debug/playground`
  15. thread 'main' panicked at 'byte index 10 is out of bounds of `a`', src/libcore/str/mod.rs:2017:9
  16. note: Run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
  17.  
  18. */
  19.  
  20. /* ~~~~=== stdout ===~~~~
  21.  
  22. */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement