about summary refs log tree commit diff
path: root/tests/ui/suggestions/suggest-slice-swap.fixed
blob: 6418e8265d130ed8c6ffc3346de6d8cbc3e7b246 (plain)
1
2
3
4
5
6
7
8
9
//@ 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() {}