Skip to content

Commit

Permalink
Add regression test for ICE #4579
Browse files Browse the repository at this point in the history
  • Loading branch information
flip1995 committed Oct 11, 2019
1 parent 157edad commit 75d951e
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions tests/ui/ice-4579.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#![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]) };
},
_ => (),
};
}

0 comments on commit 75d951e

Please sign in to comment.