about summary refs log tree commit diff
path: root/compiler/rustc_codegen_gcc/example/std_example.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-03-11 18:36:21 +0000
committerbors <bors@rust-lang.org>2024-03-11 18:36:21 +0000
commitf685a4b3f1533091fd44580ad3d4aadba033852e (patch)
tree165ebe7ba8797a8d046add87e13cd919e1884f93 /compiler/rustc_codegen_gcc/example/std_example.rs
parent870e016b65465747b63018f1b14be13a5b09791a (diff)
parentae52a9d428209894a67488d67458ce7e0031b2df (diff)
downloadrust-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