SHARE
TWEET

Untitled

a guest Jul 21st, 2019 61 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #![allow(unreachable_code)]
  2.  
  3.  
  4. fn main() {
  5.     println!("{:?}", {
  6.         #[inline(never)]pub fn f(ary: &[u8; 5]) -> &[u8] {let idx = 1e100f64 as usize;&ary[idx..]} println!("{}", f(&[1; 5])[0xdeadbeef]);
  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 'slice index starts at 94314887364138 but ends at 5', src/libcore/slice/mod.rs:2575:5
  16. note: Run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
  17.  
  18. */
  19.  
  20. /* ~~~~=== stdout ===~~~~
  21.  
  22. */
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top