summaryrefslogtreecommitdiffstats
path: root/src/test/ui/structs-enums/numeric-fields.rs
blob: 6ff3afc38704bf622a8035485824e892be649ff0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
// run-pass
struct S(u8, u16);

fn main() {
    let s = S{1: 10, 0: 11};
    match s {
        S{0: a, 1: b, ..} => {
            assert_eq!(a, 11);
            assert_eq!(b, 10);
        }
    }
}