]>
Commit | Line | Data |
---|---|---|
b7449926 | 1 | // run-pass |
970d7e83 LB |
2 | // Tests that matching rvalues with drops does not crash. |
3 | ||
1a4d82fc | 4 | |
c34b1796 | 5 | |
1a4d82fc | 6 | pub fn main() { |
c30ab7b3 | 7 | match vec![1, 2, 3] { |
970d7e83 LB |
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 | } |