27 lines
336 B
Rust
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() {}
|