Files
rust/tests/ui/pattern/match-array-against-slice.rs
2026-06-18 05:28:05 +02:00

12 lines
279 B
Rust

//! Regression test for <https://github.com/rust-lang/rust/issues/23311>.
//! Test that we do not ICE when pattern matching an array against a slice.
//@ run-pass
fn main() {
match "foo".as_bytes() {
b"food" => (),
&[b'f', ..] => (),
_ => ()
}
}