]> git.lizzy.rs Git - rust.git/blob - src/test/ui/mir/issue-76803-branches-not-same.rs
Merge commit 'e18101137866b79045fee0ef996e696e68c920b4' into clippyup
[rust.git] / src / test / ui / mir / issue-76803-branches-not-same.rs
1 // run-pass
2
3 #[derive(Debug, Eq, PartialEq)]
4 pub enum Type {
5     A,
6     B,
7 }
8
9
10 pub fn encode(v: Type) -> Type {
11     match v {
12         Type::A => Type::B,
13         _ => v,
14     }
15 }
16
17 fn main() {
18   assert_eq!(Type::B, encode(Type::A));
19 }