rust-clippy/tests
bors dfb92532fa Auto merge of #12870 - lrh2000:sig-drop-while, r=blyxyas
`significant_drop_in_scrutinee`: Trigger lint also for scrutinees in `while let` and `if let`

This lint should also work for `if let` and `while let`, so this PR makes it actually work.

For `while let`, I can't think of any reason why this lint shouldn't be enabled. The only problem is that the lint suggests moving the significant drop above the `while let`, which is clearly invalid in the case of `while let`. I don't know if this is fixable, but this PR simply disables the wrong suggestions.

For `if let`, it seems that another lint called `if_let_mutex` has some overlapping functionality. But `significant_drop_in_scrutinee` is a bit stricter, as it will trigger even if the `else` branch does not try to lock the same mutex.

changelog: [`significant_drop_in_scrutinee`]: Trigger lint also for scrutinees in `while let` and `if let`.

r? `@blyxyas` (the third PR as promised in https://github.com/rust-lang/rust-clippy/pull/12740#issuecomment-2094876350, thanks for your review!)
2024-07-08 15:09:45 +00:00
..
test_utils
ui Auto merge of #12870 - lrh2000:sig-drop-while, r=blyxyas 2024-07-08 15:09:45 +00:00
ui-cargo Merge remote-tracking branch 'upstream/master' into rustup 2024-06-27 18:49:59 +02:00
ui-internal Refactor disallowed_methods: 2024-07-05 02:37:09 -04:00
ui-toml Refactor disallowed_methods: 2024-07-05 02:37:09 -04:00
workspace_test
check-fmt.rs
clippy.toml
compile-test.rs Merge commit '20b085d500dfba5afe0869707bf357af3afe20be' into clippy-subtree-update 2024-05-02 17:26:44 +02:00
dogfood.rs Stabilize LazyCell and LazyLock (lazy_cell) 2024-02-20 20:55:13 -07:00
headers.rs
integration.rs use short message format in integration test 2024-06-23 17:20:07 +02:00
lint_message_convention.rs Stabilize LazyCell and LazyLock (lazy_cell) 2024-02-20 20:55:13 -07:00
missing-test-files.rs Merge commit '93f0a9a91f58c9b2153868f458402155fb6265bb' into clippy-subtree-update 2024-03-07 17:19:29 +01:00
versioncheck.rs
workspace.rs Stabilize LazyCell and LazyLock (lazy_cell) 2024-02-20 20:55:13 -07:00