]> git.lizzy.rs Git - rust.git/blob - src/test/ui/binding/match-vec-rvalue.rs
Auto merge of #104730 - petrochenkov:modchild5, r=cjgillot
[rust.git] / src / test / 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 }