Skip to content

Commit

Permalink
Adds 'rustc fails to detect duplicate switch cases due to integer ove…
Browse files Browse the repository at this point in the history
…rflow' ICE

Reference: rust-lang/rust#13727
  • Loading branch information
Bruno Tavares committed Oct 23, 2015
1 parent 2ed0656 commit 409afa2
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/13727.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
fn test(val: u8) {
match val {
256 => print!("0b1110\n"),
512 => print!("0b1111\n"),
_ => print!("fail\n"),
}
}

fn main() {
test(1);
}

0 comments on commit 409afa2

Please sign in to comment.