1 // run-pass
2 #![allow(unused_imports)]
3 #![allow(non_shorthand_field_patterns)]
4 
5 // aux-build:xcrate_struct_aliases.rs
6 
7 extern crate xcrate_struct_aliases;
8 
9 use xcrate_struct_aliases::{S, S2};
10 
main()11 fn main() {
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);
23         }
24     }
25 }
26