rust/tests/ui/ice-4579.rs

14 lines
248 B
Rust
Raw Normal View History

2019-09-27 15:36:20 +02:00
#![allow(clippy::single_match)]
use std::ptr;
fn main() {
match Some(0_usize) {
Some(_) => {
let s = "012345";
unsafe { ptr::read(s.as_ptr().offset(1) as *const [u8; 5]) };
},
_ => (),
};
}