diff options
| author | bors <bors@rust-lang.org> | 2022-10-08 21:24:54 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-10-08 21:24:54 +0000 |
| commit | 272bbfb857650e0d3d05dd83a5ce1a522c94b4bd (patch) | |
| tree | ff6f3b941d23a479ff99eab4f44ae373cfa24d5c /compiler/rustc_driver/src | |
| parent | 292e313259f422c8f4c31ecaedcc14058e8f4f8b (diff) | |
| parent | 9cc8da222b3893bc13bc13c8827e93f8ea246854 (diff) | |
| download | rust-272bbfb857650e0d3d05dd83a5ce1a522c94b4bd.tar.gz rust-272bbfb857650e0d3d05dd83a5ce1a522c94b4bd.zip | |
Auto merge of #9386 - smoelius:further-enhance-needless-borrow, r=Jarcho
Further enhance `needless_borrow`, mildly refactor `redundant_clone` This PR does the following: * Moves some code from `redundant_clone` into a new `clippy_utils` module called `mir`, and wraps that code in a function called `dropped_without_further_use`. * Relaxes the "is copyable" condition condition from #9136 by also suggesting to remove borrows from values dropped without further use. The changes involve the just mentioned function. * Separates `redundant_clone` into modules. Strictly speaking, the last bullet is independent of the others. `redundant_clone` is somewhat hairy, IMO. Separating it into modules makes it slightly less so, by helping to delineate what depends upon what. I've tried to break everything up into digestible commits. r? `@Jarcho` (`@Jarcho` I hope you don't mind.) changelog: continuation of #9136
Diffstat (limited to 'compiler/rustc_driver/src')
0 files changed, 0 insertions, 0 deletions
