2018-08-30 07:18:55 -05:00
|
|
|
// run-pass
|
2018-09-25 16:51:35 -05:00
|
|
|
#![allow(unused_imports)]
|
2018-08-31 08:02:01 -05:00
|
|
|
#![allow(non_shorthand_field_patterns)]
|
|
|
|
|
2014-07-04 18:45:47 -05:00
|
|
|
// aux-build:xcrate_struct_aliases.rs
|
2015-03-22 15:13:15 -05:00
|
|
|
|
2014-07-04 18:45:47 -05:00
|
|
|
extern crate xcrate_struct_aliases;
|
|
|
|
|
|
|
|
use xcrate_struct_aliases::{S, S2};
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
let s = S2 {
|
|
|
|
x: 1,
|
|
|
|
y: 2,
|
|
|
|
};
|
|
|
|
match s {
|
|
|
|
S2 {
|
|
|
|
x: x,
|
|
|
|
y: y
|
|
|
|
} => {
|
|
|
|
assert_eq!(x, 1);
|
|
|
|
assert_eq!(y, 2);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|