]> git.proxmox.com Git - rustc.git/blob - tests/ui/binding/match-vec-rvalue.rs
New upstream version 1.68.2+dfsg1
[rustc.git] / tests / ui / binding / match-vec-rvalue.rs
1 // run-pass
2 // Tests that matching rvalues with drops does not crash.
3
4
5
6 pub fn main() {
7 match vec![1, 2, 3] {
8 x => {
9 assert_eq!(x.len(), 3);
10 assert_eq!(x[0], 1);
11 assert_eq!(x[1], 2);
12 assert_eq!(x[2], 3);
13 }
14 }
15 }