mirror of
https://github.com/rust-lang/rust.git
synced 2025-05-14 02:49:40 +00:00
![]() 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 |
||
---|---|---|
.. | ||
src | ||
Cargo.toml | ||
messages.ftl |