Sign in
android
/
toolchain
/
rustc
/
refs/heads/main
/
.
/
tests
/
ui
/
suggestions
/
suggest-slice-swap.fixed
blob: 6418e8265d130ed8c6ffc3346de6d8cbc3e7b246 [
file
] [
log
] [
blame
] [
edit
]
//@ run-rustfix
#![allow(dead_code)]
fn swap
(
arr
:
&
mut
[
u32
;
2
])
{
arr
.
swap
(
1
,
0
);
//~^ ERROR cannot borrow `arr[_]` as mutable more than once at a time
}
fn main
()
{}