bors
7e4c1ae0b6
Auto merge of #12843 - mdm:fix-unnecessary-to-owned-println-interaction, r=y21
...
Fix `unnecessary_to_owned` interaction with macro expansion
fixes #12821
In the case of an unnecessary `.iter().cloned()`, the lint `unnecessary_to_owned` might suggest to remove the `&` from references without checking if such references are inside a macro expansion. This can lead to unexpected behavior or even broken code if the lint suggestion is applied blindly. See issue #12821 for an example.
This PR checks if such references are inside macro expansions and skips this part of the lint suggestion in these cases.
changelog: [`unnecessary_to_owned`]: Don't suggest to remove `&` inside macro expansion
2024-05-27 14:26:50 +00:00
..
2024-05-02 17:26:44 +02:00
2024-05-02 17:26:44 +02:00
2024-05-02 17:26:44 +02:00
2024-05-02 17:26:44 +02:00
2024-05-25 12:03:07 +00:00
2024-05-15 16:38:57 +08:00
2024-05-02 19:42:37 -04:00
2024-05-02 19:42:37 -04:00
2024-05-02 19:42:37 -04:00
2024-05-08 21:37:55 +02:00
2024-05-02 17:26:44 +02:00
2024-05-09 09:29:18 +08:00
2024-05-09 09:29:18 +08:00
2024-05-09 09:29:18 +08:00
2024-05-02 17:26:44 +02:00
2024-05-02 17:26:44 +02:00
2024-05-02 17:26:44 +02:00
2024-05-02 17:26:44 +02:00
2024-05-02 17:26:44 +02:00
2024-05-02 17:26:44 +02:00
2024-05-02 17:26:44 +02:00
2024-05-02 17:26:44 +02:00
2024-05-24 08:44:41 +02:00
2024-05-24 08:44:41 +02:00
2024-05-24 08:44:41 +02:00
2024-05-02 17:26:44 +02: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-05-11 15:37:31 +08:00
2024-05-11 15:37:31 +08:00
2024-05-11 15:37:31 +08:00
2024-05-02 17:26:44 +02:00
2024-05-02 17:26:44 +02:00
2024-05-27 11:49:10 +08:00
2024-05-27 11:49:10 +08:00
2024-05-27 11:49:10 +08:00
2024-05-02 17:26:44 +02:00
2024-05-02 17:26:44 +02:00
2024-05-02 17:26:44 +02:00
2024-05-02 19:42:37 -04:00
2024-05-02 19:42:37 -04:00
2024-05-02 19:42:37 -04:00
2024-05-02 19:42:37 -04:00
2024-05-02 19:42:37 -04:00
2024-05-14 00:10:45 +02:00
2024-05-14 00:10:45 +02:00
2024-05-14 00:10:45 +02:00
2024-05-14 00:10:45 +02:00
2024-05-14 00:10:45 +02:00
2024-05-14 00:10:45 +02:00
2024-05-14 00:10:45 +02:00
2024-05-02 19:42:37 -04:00
2024-05-02 19:42:37 -04:00
2024-05-12 21:59:45 -03:00
2024-05-02 17:26:44 +02:00
2024-05-02 17:26:44 +02:00
2024-05-02 17:26:44 +02:00
2024-05-02 17:26:44 +02:00
2024-05-05 12:08:38 -04:00
2024-05-05 12:08:38 -04:00
2024-05-05 12:08:38 -04:00
2024-05-02 17:26:44 +02:00
2024-05-02 17:26:44 +02:00
2024-05-08 13:44:22 +08:00
2024-05-02 17:26:44 +02:00
2024-05-02 17:26:44 +02:00
2024-05-02 17:26:44 +02:00
2024-05-02 17:26:44 +02:00
2024-05-02 17:26:44 +02:00
2024-05-27 11:49:10 +08:00
2024-05-27 11:49:10 +08:00
2024-05-27 11:49:10 +08:00
2024-05-14 17:22:56 +00:00
2024-05-14 17:22:56 +00:00
2024-05-02 17:26:44 +02:00
2024-05-02 17:26:44 +02:00
2024-05-22 15:26:32 +08:00
2024-05-22 15:26:32 +08:00
2024-05-22 15:26:32 +08:00
2024-05-02 17:26:44 +02:00
2024-05-02 17:26:44 +02:00
2024-05-02 17:26:44 +02:00
2024-05-02 17:26:44 +02:00
2024-05-02 17:26:44 +02:00
2024-05-02 17:26:44 +02:00
2024-05-23 00:37:02 +08:00
2024-05-23 00:37:02 +08:00
2024-05-02 17:26:44 +02:00
2024-05-02 17:26:44 +02:00
2024-05-02 17:26:44 +02:00
2024-05-02 17:26:44 +02:00
2024-05-02 17:26:44 +02:00
2024-05-08 21:37:54 +02:00
2024-05-08 21:37:54 +02:00
2024-05-08 21:37:54 +02:00
2024-05-02 17:26:44 +02:00
2024-05-02 17:26:44 +02:00
2024-05-02 17:26:44 +02:00
2024-05-27 12:05:18 +02:00
2024-05-27 12:05:18 +02:00
2024-05-27 12:05:18 +02:00
2024-05-27 12:05:18 +02:00
2024-05-16 19:54:43 +02:00
2024-05-16 19:54:43 +02:00
2024-05-02 14:48:18 -07:00
2024-05-02 14:48:18 -07:00
2024-05-06 00:04:00 +02:00
2024-05-06 00:04:00 +02:00