Sign in
android
/
toolchain
/
rustc
/
refs/heads/main
/
.
/
tests
/
ui
/
moves
/
pin-mut-reborrow.fixed
blob: f703cedd6c10cc70818b53485c41e665727ae41a [
file
] [
log
] [
blame
] [
edit
]
//@ run-rustfix
use
std
::
pin
::
Pin
;
struct
Foo
;
impl
Foo
{
fn foo
(
self
:
Pin
<&
mut
Self
>)
{}
}
fn main
()
{
let
mut foo
=
Foo
;
let
mut foo
=
Pin
::
new
(&
mut foo
);
foo
.
as_mut
().
foo
();
foo
.
foo
();
//~ ERROR use of moved value
}