Created
July 31, 2016 11:32
-
-
Save cengiz-io/1f2890c8d96c3f8ef1d8a45c43b7198e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#[inline(never)] | |
pub fn f(ary: &[u8; 5]) -> &[u8] { | |
let idx = 1e100f64 as usize; | |
&ary[idx..] | |
} | |
fn main() { | |
let a = &[1; 5]; | |
let z = f(a); | |
println!("{}", z[0xdeadbeef]); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment