Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #![allow(unreachable_code)]
- fn main() {
- println!("{:?}", {
- &"a"[..10]
- });
- }
- /* ~~~~=== stderr ===~~~~
- Compiling playground v0.0.1 (/playground)
- Finished dev [unoptimized + debuginfo] target(s) in 0.39s
- Running `target/debug/playground`
- thread 'main' panicked at 'byte index 10 is out of bounds of `a`', src/libcore/str/mod.rs:2017:9
- note: Run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
- */
- /* ~~~~=== stdout ===~~~~
- */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement