Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #![allow(unreachable_code)]
- fn main() {
- println!("{:?}", {
- #[inline(never)]pub fn f(ary: &[u8; 5]) -> &[u8] {let idx = 1e100f64 as usize;&ary[idx..]} println!("{}", f(&[1; 5])[0xdeadbeef]);
- });
- }
- /* ~~~~=== stderr ===~~~~
- Compiling playground v0.0.1 (/playground)
- Finished dev [unoptimized + debuginfo] target(s) in 0.46s
- Running `target/debug/playground`
- thread 'main' panicked at 'slice index starts at 93950871891210 but ends at 5', src/libcore/slice/mod.rs:2561:5
- note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
- */
- /* ~~~~=== stdout ===~~~~
- */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement