Sign in
android
/
toolchain
/
rustc
/
refs/heads/main
/
.
/
tests
/
ui
/
mir
/
issue-76803-branches-not-same.rs
blob: ef8e3c80db817e9cf1b311a2ace5a07c5b74aaaf [
file
] [
log
] [
blame
] [
edit
]
//@ run-pass
#[
derive
(
Debug
,
Eq
,
PartialEq
)]
pub
enum
Type
{
A
,
B
,
}
pub
fn
encode
(
v
:
Type
)
->
Type
{
match
v
{
Type
::
A
=>
Type
::
B
,
_
=>
v
,
}
}
fn
main
()
{
assert_eq
!(
Type
::
B
,
encode
(
Type
::
A
));
}