diff options
| author | bors <bors@rust-lang.org> | 2024-03-11 18:36:21 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-03-11 18:36:21 +0000 |
| commit | f685a4b3f1533091fd44580ad3d4aadba033852e (patch) | |
| tree | 165ebe7ba8797a8d046add87e13cd919e1884f93 /compiler/rustc_codegen_gcc/example/std_example.rs | |
| parent | 870e016b65465747b63018f1b14be13a5b09791a (diff) | |
| parent | ae52a9d428209894a67488d67458ce7e0031b2df (diff) | |
| download | rust-f685a4b3f1533091fd44580ad3d4aadba033852e.tar.gz rust-f685a4b3f1533091fd44580ad3d4aadba033852e.zip | |
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
Diffstat (limited to 'compiler/rustc_codegen_gcc/example/std_example.rs')
0 files changed, 0 insertions, 0 deletions
