Sign in
android
/
toolchain
/
rustc
/
refs/heads/main
/
.
/
tests
/
ui
/
issues
/
issue-28839.rs
blob: 76b0fa2d6e0893227d117e250beed121804775c3 [
file
] [
log
] [
blame
] [
edit
]
//@ run-pass
pub
struct
Foo
;
pub
fn
get_foo2
<
'a>(foo: &'
a
mut
Option
<&
'a mut Foo>) -> &'
a
mut
Foo
{
match
foo
{
// Ensure that this is not considered a move, but rather a reborrow.
&
mut
Some
(
ref
mut
x
)
=>
*
x
,
&
mut
None
=>
panic
!(),
}
}
fn
main
()
{
}