bors f685a4b3f1 Auto merge of #12378 - GuillaumeGomez:duplicated_attr, r=blyxyas
Add new `duplicated_attributes` lint

It's a lint idea that `@llogiq` gave me while reviewing another PR.

There are some limitations, in particular for the "output". Initially I wanted to make it possible for directly lint against the whole attribute if its parts were all duplicated, but then I realized that the output would be chaotic if the duplicates were coming from different attributes, so I preferred to go to the simplest way and simply emit a warning for each entry. Not the best, but makes the implementation much easier.

Another limitation is that `cfg_attr` would be a bit more tricky to implement because we need to check if two `cfg` sets are exactly the same. I added a FIXME and will likely come back to it later.

And finally, I updated the `cargo dev update_lints` command because the generated `tests/ui/rename.rs` file was emitting the `duplicated_attributes` lint, so I allowed this lint inside it to prevent it from working.

changelog: Add new `duplicated_attributes` lint
2024-03-11 18:36:21 +00:00
..
2024-03-01 16:37:23 +01:00
2024-03-01 16:37:23 +01:00
2024-03-01 16:37:23 +01:00
2024-03-01 16:37:23 +01:00
2024-03-01 16:36:04 +01:00
2024-03-01 16:37:23 +01:00
2024-03-10 01:23:28 +01:00
2024-03-10 01:23:28 +01:00
2024-03-10 01:23:28 +01:00
2024-03-10 01:23:28 +01:00
2024-03-10 01:23:28 +01:00
2024-03-10 01:23:28 +01:00
2024-03-10 01:23:28 +01:00
2024-03-09 12:43:19 +01:00
2024-03-09 12:43:19 +01:00
2024-03-08 22:39:36 -05:00
2024-03-01 16:36:04 +01:00
2024-03-01 16:36:04 +01:00
2024-03-01 16:37:23 +01:00
2024-03-03 08:32:30 +01:00
2024-03-03 08:32:30 +01:00
2024-03-10 01:23:28 +01:00
2024-03-10 01:23:28 +01:00
2024-03-10 01:23:28 +01:00