blob: 5358d13faa99aea9ba4a571b04754d23cc8835c9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
// 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);
}
|