1 2 3 4 5 6 7 8 9 10
fn main() { let arr = [1, 2]; let slice: &[i32] = &arr; match slice { [1] => {}, [_, 2] => {}, _ => {} } }