blob: be0d3ff7da78ff6d3e1572f4a6ef313ae0d10f4e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
// check-pass
#![feature(never_type, exhaustive_patterns)]
trait Tag {
type TagType;
}
enum Keep {}
enum Erase {}
impl Tag for Keep {
type TagType = ();
}
impl Tag for Erase {
type TagType = !;
}
enum TagInt<T: Tag> {
Untagged(i32),
Tagged(T::TagType, i32)
}
fn test(keep: TagInt<Keep>, erase: TagInt<Erase>) {
match erase {
TagInt::Untagged(_) => (),
TagInt::Tagged(_, _) => ()
};
}
fn main() {}
|