Files
rust/tests/ui
bors 0dc265ff82 Auto merge of #12756 - y21:assigning_clones_lifetimes, r=Alexendoo
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
2024-06-15 18:25:42 +00:00
..
2024-06-08 12:31:49 +00:00
2024-06-07 12:51:37 +00:00
2024-06-08 12:31:49 +00:00
2024-04-24 13:12:33 +01:00
2024-06-01 14:11:07 +02:00
2024-05-30 22:53:43 +08:00
2024-05-08 21:37:55 +02:00
2024-05-08 21:37:55 +02:00
2024-05-08 21:37:55 +02:00
2024-04-27 10:54:35 +03:00
2023-09-23 13:47:30 +00:00
2024-05-30 22:53:43 +08:00
2024-04-27 10:54:35 +03:00
2024-04-24 13:12:33 +01:00
2024-04-24 13:12:33 +01:00
2024-06-09 07:47:42 +01:00
2023-10-04 21:09:54 +00:00
2023-10-13 21:01:36 +00:00