rust/src/test/ui/issues/issue-57866.rs
2019-01-25 15:19:37 +01:00

27 lines
336 B
Rust

// compile-pass
#![feature(type_alias_enum_variants)]
enum Outer<T> {
A(T)
}
enum Inner {
A(i32)
}
type OuterAlias = Outer<Inner>;
fn ice(x: OuterAlias) {
// Fine
match x {
OuterAlias::A(Inner::A(_)) => (),
}
// Not fine
match x {
OuterAlias::A(Inner::A(y)) => (),
}
}
fn main() {}