Skip to content

Commit 409afa2

Browse files
author
Bruno Tavares
committed
Adds 'rustc fails to detect duplicate switch cases due to integer overflow' ICE
Reference: rust-lang/rust#13727
1 parent 2ed0656 commit 409afa2

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/13727.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
fn test(val: u8) {
2+
match val {
3+
256 => print!("0b1110\n"),
4+
512 => print!("0b1111\n"),
5+
_ => print!("fail\n"),
6+
}
7+
}
8+
9+
fn main() {
10+
test(1);
11+
}

0 commit comments

Comments
 (0)