summaryrefslogtreecommitdiffstats
path: root/tests/ui/structs-enums/struct-destructuring-cross-crate.rs
blob: 19e0a0bbdd2e3c94bdbd93e5e3841004c3eb5c17 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
// run-pass
// aux-build:struct_destructuring_cross_crate.rs


extern crate struct_destructuring_cross_crate;

pub fn main() {
    let x = struct_destructuring_cross_crate::S { x: 1, y: 2 };
    let struct_destructuring_cross_crate::S { x: a, y: b } = x;
    assert_eq!(a, 1);
    assert_eq!(b, 2);
}