diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2024-01-19 19:27:03 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-01-19 19:27:03 +0100 |
| commit | c851150236c7c717c181160fdb6dc5c9d263e6fe (patch) | |
| tree | 1913f73db6d24a482da827457a18d2496b73f109 /compiler/rustc_pattern_analysis/src | |
| parent | 42e79734e9009b6ec006112bd73d616f227c02e2 (diff) | |
| parent | f9faf161817eef2b885bd47908ceaeef675ea72f (diff) | |
| download | rust-c851150236c7c717c181160fdb6dc5c9d263e6fe.tar.gz rust-c851150236c7c717c181160fdb6dc5c9d263e6fe.zip | |
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
Diffstat (limited to 'compiler/rustc_pattern_analysis/src')
0 files changed, 0 insertions, 0 deletions
