Matthias Krüger
52f7d33109
Rollup merge of #128244 - compiler-errors:move-clone-sugg, r=estebank
...
Peel off explicit (or implicit) deref before suggesting clone on move error in borrowck, remove some hacks
Also remove a heck of a lot of weird hacks in `suggest_cloning` that I don't think we should have around.
I know this regresses tests, but I don't believe most of these suggestions were accurate, b/c:
1. They either produced type errors (e.g. turning `&x` into `x.clone()`)
2. They don't fix the issue
3. They fix the issue ostensibly, but introduce logic errors (e.g. cloning a `&mut Option<T>` to then `Option::take` out...)
Most of the suggestions are still wrong, but they're not particularly *less* wrong IMO.
Stacked on top of #128241 , which is an "obviously worth landing" subset of this PR.
r? estebank
2024-07-31 23:20:11 +02:00
..
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-07-24 08:46:52 +02:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2024-02-16 20:02:50 +00:00
2023-11-24 19:15:52 +01:00
2024-07-11 12:23:44 +10:00
2024-02-29 09:34:15 +01:00
2023-11-24 19:15:52 +01:00
2024-02-16 20:02:50 +00:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2024-02-16 20:02:50 +00:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2024-02-16 20:02:50 +00:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2024-02-16 20:02:50 +00:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2024-02-14 11:00:30 +00:00
2024-02-14 11:00:30 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2024-07-14 13:50:09 +09:00
2024-02-14 11:00:30 +00:00
2024-02-14 11:00:30 +00:00
2024-07-14 13:50:09 +09:00
2024-07-14 13:50:09 +09:00
2023-11-24 19:15:52 +01:00
2024-06-25 10:00:30 +08:00
2024-04-14 09:42:53 -04:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2024-02-01 16:18:03 +01:00
2023-11-24 19:15:52 +01:00
2024-02-17 23:16:30 -08:00
2023-11-24 19:15:52 +01:00
2024-07-22 22:04:49 +00:00
2024-07-22 22:51:53 +00:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2024-06-21 19:00:18 -04:00
2024-04-09 10:23:58 +00:00
2024-04-09 10:23:58 +00:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2024-02-05 10:17:31 +00:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2024-01-05 09:30:27 +00:00
2024-01-05 10:00:59 +00:00
2023-11-24 19:15:52 +01:00
2024-07-11 12:23:44 +10:00
2023-12-15 16:12:27 +00:00
2023-11-24 19:15:52 +01:00
2024-02-16 20:02:50 +00:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-12-07 22:33:56 +01:00
2023-11-24 19:15:52 +01:00
2024-01-11 09:03:26 +00:00
2024-01-11 09:03:26 +00:00
2024-05-30 22:52:33 +02:00
2024-07-17 21:30:40 +00:00
2024-07-18 00:00:04 +00:00
2023-11-24 19:15:52 +01:00
2024-07-18 00:00:04 +00:00
2024-07-18 00:00:04 +00:00
2024-05-20 11:13:10 -04:00
2024-05-20 11:13:10 -04:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-12-15 16:12:27 +00:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2024-02-16 20:02:50 +00:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2024-01-30 21:28:18 +00:00
2023-11-24 19:15:52 +01:00
2024-01-30 21:28:18 +00:00
2023-11-24 19:15:52 +01:00
2024-01-24 02:53:15 +00:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2024-07-06 21:00:30 +08:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2024-02-05 10:17:31 +00:00
2024-03-07 06:27:09 +00:00
2024-02-05 10:17:31 +00:00
2024-03-07 06:27:09 +00:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2024-02-19 22:11:13 +00:00
2024-02-19 22:11:13 +00:00
2023-11-24 19:15:52 +01:00
2024-02-01 16:18:03 +01:00
2024-07-04 02:41:13 +00:00
2024-07-27 21:12:54 +02:00
2024-02-19 22:11:13 +00:00
2024-02-10 23:13:47 +01:00
2024-02-10 23:13:47 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2024-02-14 20:15:13 +00:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2024-07-29 23:49:51 +00:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-07-11 20:39:24 +00:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2024-04-12 12:59:40 +09:00
2024-04-12 12:59:40 +09:00
2024-04-12 12:59:40 +09:00
2023-12-28 19:46:40 +01:00
2023-12-28 19:46:40 +01:00
2023-11-24 19:15:52 +01:00
2023-11-30 08:26:13 -08:00
2023-11-24 19:15:52 +01:00
2024-02-16 20:02:50 +00:00
2023-11-24 19:15:52 +01:00
2024-02-16 20:02:50 +00:00
2023-11-24 19:15:52 +01:00
2023-11-23 12:25:41 +00:00
2023-11-23 12:25:41 +00:00
2024-02-16 20:02:50 +00:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2024-07-26 14:41:56 -04:00
2024-07-26 14:41:56 -04:00
2023-11-24 19:15:52 +01:00
2024-04-24 22:21:15 +00:00
2024-04-24 22:21:15 +00:00
2024-04-24 22:21:15 +00:00
2024-04-24 22:21:15 +00:00
2024-02-25 08:15:44 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2024-02-16 20:02:50 +00:00
2024-06-21 19:00:18 -04:00
2023-11-24 19:15:52 +01:00
2024-04-17 13:00:43 +02:00
2024-04-17 13:00:43 +02:00
2024-02-16 20:02:50 +00:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2024-02-08 08:10:43 +00:00
2024-02-08 08:10:43 +00:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2024-07-12 03:02:57 +00:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2024-07-18 20:08:38 +00:00
2024-02-16 20:02:50 +00:00
2024-06-25 17:22:22 +02:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-16 17:00:23 +00:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-12-20 22:53:56 -05:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2024-03-20 17:29:58 +00:00
2024-03-20 17:29:58 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2024-03-08 19:08:13 +00:00
2024-03-08 19:08:13 +00:00
2024-01-13 12:46:58 -05:00
2023-11-24 19:15:52 +01:00
2024-04-17 13:00:43 +02:00
2024-04-17 13:00:43 +02:00
2024-01-09 21:08:16 +00:00
2024-03-07 14:26:31 +00:00
2023-11-24 19:15:52 +01:00
2024-07-19 19:39:37 +00:00
2024-07-17 11:01:29 +01:00
2024-07-17 11:01:29 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2024-02-16 20:02:50 +00:00
2024-01-24 02:53:15 +00:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00