diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2022-11-18 14:13:37 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-11-18 14:13:37 +0100 |
| commit | 8749eda8eeca89be9fe750fd21a057d519761e5b (patch) | |
| tree | dae5fc98c88a3d3cc6ba48beab853197211b0465 /tests/rustdoc-ui/coverage/json.rs | |
| parent | f7535e771d26715177c2f20a3a727e8727a9b073 (diff) | |
| parent | 82afb1617938e7075021ba440f1bcc0812dc4a37 (diff) | |
| download | rust-8749eda8eeca89be9fe750fd21a057d519761e5b.tar.gz rust-8749eda8eeca89be9fe750fd21a057d519761e5b.zip | |
Rollup merge of #104006 - flip1995:lang-items-clippy, r=oli-obk
Add variant_name function to `LangItem` Clippy has an internal lint that checks for the usage of hardcoded def paths and suggests to replace them with a lang or diagnostic item, if possible. This was implemented with a hack, by getting all the variants of the `LangItem` enum and then index into it with the position of the `LangItem` in the `items` list. This is no longer possible, because the `items` list can't be accessed anymore. Follow up to #103603 cc `@camsteffen` r? `@oli-obk` This is blocking the sync between Clippy and Rust. I'm not sure if this is the best solution here, or if I should add a method `items()` to `LanguageItems` and keep the code in Clippy unchanged.
Diffstat (limited to 'tests/rustdoc-ui/coverage/json.rs')
0 files changed, 0 insertions, 0 deletions
