rust/tests
Jason Newcomb 650e0c8d3d
Fix shadow_unrelated's behaviour with closures (#13677)
Fixes https://github.com/rust-lang/rust-clippy/issues/10780

We correctly no longer give a warning when a closure is passed to a
method, where one of the arguments to that method uses the variable
which would be shadowed by an argument to that closure.
Uses is defined loosely as any expression used in the calling expression
mentions the shadowee binding (except for the closure itself):

```rust
#![deny(clippy::shadow_unrelated)]
let x = Some(1);
let y = x.map(|x| x + 1);
```
will now succeed.

See https://github.com/linebender/xilem/pull/745 - without this change,
all of the `expect(shadow_unrelated)` in the repository are met; with
it, none of them are.

changelog: [`shadow_unrelated`]: Don't treat closures arguments as
unrelated when the calling function uses them
2024-11-30 17:08:08 +00:00
..
test_utils
ui Fix shadow_unrelated's behaviour with closures (#13677) 2024-11-30 17:08:08 +00:00
ui-cargo Merge commit '68a799aea9' into clippy-subtree-update 2024-06-27 18:56:04 +02:00
ui-internal Rename all clippy_config::msrvs -> clippy_utils::msrvs 2024-11-15 19:38:09 +01:00
ui-toml Fix large_include_file lint being triggered all the time by doc comments 2024-11-09 13:55:20 +01:00
workspace_test Merge commit 'cb806113e0' into clippy-subtree-update 2024-08-08 19:13:50 +02:00
check-fmt.rs Merge commit 'cb806113e0' into clippy-subtree-update 2024-08-08 19:13:50 +02:00
clippy.toml
compile-test.rs Merge commit 'f712eb5cdc' into clippy-subtree-update 2024-11-07 22:37:01 +01:00
config-metadata.rs Merge commit 'a109190d70' into clippy-subtree-update 2024-10-18 13:44:06 +02:00
dogfood.rs Merge commit '7901289135' into clippy-subtree-update 2024-09-24 11:58:04 +02:00
headers.rs
integration.rs Merge commit 'cb806113e0' into clippy-subtree-update 2024-08-08 19:13:50 +02:00
lint_message_convention.rs Merge commit 'cb806113e0' into clippy-subtree-update 2024-08-08 19:13:50 +02:00
missing-test-files.rs Merge commit 'cb806113e0' into clippy-subtree-update 2024-08-08 19:13:50 +02:00
versioncheck.rs Merge commit 'a109190d70' into clippy-subtree-update 2024-10-18 13:44:06 +02:00
workspace.rs