0dc265ff82
Avoid emitting `assigning_clones` when cloned data borrows from the place to clone into Fixes #12444 Fixes #12460 Fixes #12749 Fixes #12757 Fixes #12929 I think the documentation for the function should describe what- and how this is fixing the issues well. It avoids emitting a warning when the data being cloned borrows from the place to clone into, which is information that we can get from `PossibleBorrowerMap`. Unfortunately, it is a tiny bit tedious to match on the MIR like that and I'm not sure if this is possibly relying a bit too much on the exact MIR lowering for assignments. Things left to do: - [x] Handle place projections (or verify that they work as expected) - [x] Handle non-`Drop` types changelog: [`assigning_clones`]: avoid warning when the suggestion would lead to a borrow-check error |
||
---|---|---|
.. | ||
test_utils | ||
ui | ||
ui-cargo | ||
ui-internal | ||
ui-toml | ||
workspace_test | ||
check-fmt.rs | ||
clippy.toml | ||
compile-test.rs | ||
dogfood.rs | ||
headers.rs | ||
integration.rs | ||
lint_message_convention.rs | ||
missing-test-files.rs | ||
versioncheck.rs | ||
workspace.rs |