]> git.lizzy.rs Git - rust.git/blob - src/test/ui/binding/match-vec-rvalue.rs
Merge commit '5988bbd24aa87732bfa1d111ba00bcdaa22c481a' into sync_cg_clif-2020-11-27
[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 }