Sign in
fuchsia
/
third_party
/
rust
/
03222c037142e915e9ea75f681ab98a5a46b8739
/
.
/
src
/
test
/
ui
/
did_you_mean
/
issue-37139.rs
blob: 07d855d0969f3e7490b7c8bf51fae8ef5d9b2742 [
file
] [
log
] [
blame
]
enum
TestEnum
{
Item
(
i32
),
}
fn
test
(
_
:
&
mut
i32
)
{
}
fn
main
()
{
let
mut
x
=
TestEnum
::
Item
(
10
);
match
x
{
TestEnum
::
Item
(
ref
mut
x
)
=>
{
test
(&
mut
x
);
//~ ERROR cannot borrow `x` as mutable, as it is not declared as mutable
}
}
}