mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-28 01:34:21 +00:00
15 lines
325 B
Rust
15 lines
325 B
Rust
//@ run-pass
|
|
//@ aux-build:struct_variant_xc_aux.rs
|
|
|
|
extern crate struct_variant_xc_aux;
|
|
|
|
use struct_variant_xc_aux::Enum::{StructVariant, Variant};
|
|
|
|
pub fn main() {
|
|
let arg = match (StructVariant { arg: 42 }) {
|
|
Variant(_) => unreachable!(),
|
|
StructVariant { arg } => arg
|
|
};
|
|
assert_eq!(arg, 42);
|
|
}
|