]> git.proxmox.com Git - rustc.git/blame - src/test/ui/binding/match-vec-rvalue.rs
Merge tag 'debian/1.52.1+dfsg1-1_exp2' into proxmox/buster
[rustc.git] / src / test / ui / binding / match-vec-rvalue.rs
CommitLineData
b7449926 1// run-pass
970d7e83
LB
2// Tests that matching rvalues with drops does not crash.
3
1a4d82fc 4
c34b1796 5
1a4d82fc 6pub 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}