mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-18 11:34:11 +00:00
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 |
||
---|---|---|
.. | ||
src | ||
Cargo.toml | ||
README.md |