Sign in
android
/
toolchain
/
rustc
/
89a0a0cd9cbd0a0138a09bd877bbc73859a8c330
/
.
/
src
/
test
/
ui
/
borrowck
/
borrowck-issue-2657-1.rs
blob: 0fb2267b982ea6fb9505d1b47e2fc1270a932d60 [
file
] [
log
] [
blame
]
trait
Fake
{
fn
use_mut
(&
mut
self
)
{
}
fn
use_ref
(&
self
)
{
}
}
impl
<
T
>
Fake
for
T
{
}
fn
main
()
{
let
x
:
Option
<
Box
<
_
>>
=
Some
(
Box
::
new
(
1
));
match
x
{
Some
(
ref
_y
)
=>
{
let
_a
=
x
;
//~ ERROR cannot move
_y
.
use_ref
();
}
_
=>
{}
}
}