mirror of
https://github.com/rust-lang/rust.git
synced 2024-10-31 22:41:50 +00:00
47 lines
1.0 KiB
Rust
47 lines
1.0 KiB
Rust
// run-pass
|
|
|
|
fn main() {
|
|
match b"." as &[u8] {
|
|
b"." if true => {},
|
|
b"." => panic!(),
|
|
b".." => panic!(),
|
|
b"" => panic!(),
|
|
_ => panic!(),
|
|
}
|
|
match b"." as &[u8] {
|
|
b"." if false => panic!(),
|
|
b"." => {},
|
|
b".." => panic!(),
|
|
b"" => panic!(),
|
|
_ => panic!(),
|
|
}
|
|
match b".." as &[u8] {
|
|
b"." if true => panic!(), // the miscompile caused this arm to be reached
|
|
b"." => panic!(),
|
|
b".." => {},
|
|
b"" => panic!(),
|
|
_ => panic!(),
|
|
}
|
|
match b".." as &[u8] {
|
|
b"." if false => panic!(),
|
|
b"." => panic!(),
|
|
b".." => {},
|
|
b"" => panic!(),
|
|
_ => panic!(),
|
|
}
|
|
match b"" as &[u8] {
|
|
b"." if true => panic!(),
|
|
b"." => panic!(),
|
|
b".." => panic!(),
|
|
b"" => {},
|
|
_ => panic!(),
|
|
}
|
|
match b"" as &[u8] {
|
|
b"." if false => panic!(),
|
|
b"." => panic!(),
|
|
b".." => panic!(),
|
|
b"" => {},
|
|
_ => panic!(),
|
|
}
|
|
}
|