Skip to content

Commit 6c0a516

Browse files
authored
Rollup merge of #120126 - sjwang05:issue-102269, r=compiler-errors
Suggest `.swap()` when encountering conflicting borrows from `mem::swap` on a slice This PR modifies the existing suggestion by matching on `[ProjectionElem::Deref, ProjectionElem::Index(_)]` instead of just `[ProjectionElem::Index(_)]`, which caused us to miss many cases. Additionally, it adds a more specific, machine-applicable suggestion in the case we determine `mem::swap` was used to swap elements in a slice. Closes #102269
2 parents b8c0f84 + c368b4c commit 6c0a516

File tree

0 file changed

+0
-0
lines changed

    0 file changed

    +0
    -0
    lines changed

    0 commit comments

    Comments
     (0)