]> git.lizzy.rs Git - rust.git/blob - tests/ui/crashes/ice-4579.rs
Auto merge of #5246 - JarredAllen:master, r=flip1995
[rust.git] / tests / ui / crashes / ice-4579.rs
1 #![allow(clippy::single_match)]
2
3 use std::ptr;
4
5 fn main() {
6     match Some(0_usize) {
7         Some(_) => {
8             let s = "012345";
9             unsafe { ptr::read(s.as_ptr().offset(1) as *const [u8; 5]) };
10         },
11         _ => (),
12     };
13 }