]> git.lizzy.rs Git - rust.git/blob - tests/run-pass/ptr_arith_offset.rs
7912da9fd437ce45e8479b74bc13dedf78773af9
[rust.git] / tests / run-pass / ptr_arith_offset.rs
1 fn main() {
2     let v = [1i16, 2];
3     let x = &v as *const i16;
4     let x = x.wrapping_offset(1);
5     assert_eq!(unsafe { *x }, 2);
6 }