Skip to content

Commit

Permalink
Add regression test for ICE rust-lang#4579
Browse files Browse the repository at this point in the history
  • Loading branch information
flip1995 committed Sep 30, 2019
1 parent 406e89a commit 4188057
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 4188057

Please sign in to comment.