]>
Commit | Line | Data |
---|---|---|
b7449926 | 1 | // run-pass |
0bf4aa26 | 2 | #![allow(unused_imports)] |
b7449926 XL |
3 | #![allow(non_shorthand_field_patterns)] |
4 | ||
1a4d82fc | 5 | // aux-build:xcrate_struct_aliases.rs |
c34b1796 | 6 | |
1a4d82fc JJ |
7 | extern crate xcrate_struct_aliases; |
8 | ||
9 | use xcrate_struct_aliases::{S, S2}; | |
10 | ||
223e47cc | 11 | fn main() { |
1a4d82fc JJ |
12 | let s = S2 { |
13 | x: 1, | |
14 | y: 2, | |
15 | }; | |
16 | match s { | |
17 | S2 { | |
18 | x: x, | |
19 | y: y | |
20 | } => { | |
21 | assert_eq!(x, 1); | |
22 | assert_eq!(y, 2); | |
223e47cc LB |
23 | } |
24 | } | |
223e47cc | 25 | } |