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 27, 2019
1 parent bca08a6 commit 30bc54f
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions tests/ui/ice-4579.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#![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]) };
// ^ No expr_ty for this expr
},
_ => (),
};
}

0 comments on commit 30bc54f

Please sign in to comment.