about summary refs log tree commit diff
path: root/tests/ui/mir/issue-89485.rs
blob: afd05f477e598fb584903f312c96e22c089f5d3f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// Regression test for issue #89485.

//@ run-pass

#[derive(Debug, Eq, PartialEq)]
pub enum Type {
    A = 1,
    B = 2,
}
pub fn encode(v: Type) -> Type {
    match v {
        Type::A => Type::B,
        _ => v,
    }
}
fn main() {
  assert_eq!(Type::B, encode(Type::A));
}