Sign in
android
/
toolchain
/
rustc
/
d720b3f2ba07cb42ff7b311589c99daefe3aaa22
/
.
/
tests
/
ui
/
mir
/
issue-89485.rs
blob: cb507eefebbe53e743cbf634b0ffb98710bf43cb [
file
] [
log
] [
blame
]
// 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
));
}