Skip to content

Commit c5463fe

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 9325569 commit c5463fe

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/13727.rs

+11
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)