Sign in
fuchsia
/
third_party
/
github.com
/
rust-lang
/
rust
/
677ba040b72b3e5040b224a0aa5e41cef4f712c7
/
.
/
src
/
test
/
ui
/
suggestions
/
suggest-split-at-mut.rs
blob: d294c20b8240eacdc5511728120c9c153f2c0a5a [
file
] [
log
] [
blame
]
fn
main
()
{
let
mut
foo
=
[
1
,
2
,
3
,
4
];
let
a
=
&
mut
foo
[
2
];
let
b
=
&
mut
foo
[
3
];
//~ ERROR cannot borrow `foo[_]` as mutable more than once at a time
*
a
=
5
;
*
b
=
6
;
println
!(
"{:?} {:?}"
,
a
,
b
);
}