rust/tests
bors 272bbfb857 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
2022-10-08 21:24:54 +00:00
..
test_utils Move/rename lazy::Sync{OnceCell,Lazy} to sync::{Once,Lazy}Lock 2022-06-16 19:54:42 +04:00
ui Auto merge of #9386 - smoelius:further-enhance-needless-borrow, r=Jarcho 2022-10-08 21:24:54 +00:00
ui-cargo Merge remote-tracking branch 'upstream/master' into rustup 2022-10-06 09:19:29 +02:00
ui-internal Merge remote-tracking branch 'upstream/master' into rustup 2022-10-06 09:19:29 +02:00
ui-toml Merge remote-tracking branch 'upstream/master' into rustup 2022-10-06 09:19:29 +02:00
workspace_test Merge commit '97a5daa65908e59744e2bc625b14849352231c75' into clippyup 2022-01-13 13:18:19 +01:00
check-fmt.rs Merge commit 'f51aade56f93175dde89177a92e3669ebd8e7592' into clippyup 2022-08-31 09:24:45 -04:00
clippy.toml
compile-test.rs Fix adjacent code 2022-10-07 05:07:44 -04:00
dogfood.rs Merge commit 'f51aade56f93175dde89177a92e3669ebd8e7592' into clippyup 2022-08-31 09:24:45 -04:00
integration.rs Fix panic when displaying the backtrace of failing integration tests 2022-09-25 09:15:29 -04:00
lint_message_convention.rs a few more core lint fixes 2022-09-23 13:55:30 -04:00
missing-test-files.rs a few more core lint fixes 2022-09-23 13:55:30 -04:00
versioncheck.rs Fix adjacent code 2022-10-07 05:07:44 -04:00
workspace.rs Merge commit 'f51aade56f93175dde89177a92e3669ebd8e7592' into clippyup 2022-08-31 09:24:45 -04:00