Sign in
android
/
toolchain
/
rustc
/
refs/heads/main
/
.
/
tests
/
ui
/
borrowck
/
two-phase-multi-mut.rs
blob: bb646d7caf1e2ea917270a3ec137d3fb6e5e9b38 [
file
] [
log
] [
blame
] [
edit
]
struct
Foo
{
}
impl
Foo
{
fn
method
(&
mut
self
,
foo
:
&
mut
Foo
)
{
}
}
fn
main
()
{
let
mut
foo
=
Foo
{
};
foo
.
method
(&
mut
foo
);
//~^ cannot borrow `foo` as mutable more than once at a time
//~^^ cannot borrow `foo` as mutable more than once at a time
}