diff options
| author | Philipp Krones <hello@philkrones.com> | 2022-11-05 15:08:37 +0100 |
|---|---|---|
| committer | Philipp Krones <hello@philkrones.com> | 2022-11-17 20:06:25 +0100 |
| commit | 4e65f5ea82aa8c128c4dc8611677019679a9bc67 (patch) | |
| tree | 8e4808fae244041fc619ffc680e299a0b6cd29dd /compiler/rustc_codegen_llvm/src/errors.rs | |
| parent | b6097f2e1b2ca62e188ba53cf43bd66b06b36915 (diff) | |
| download | rust-4e65f5ea82aa8c128c4dc8611677019679a9bc67.tar.gz rust-4e65f5ea82aa8c128c4dc8611677019679a9bc67.zip | |
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.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/errors.rs')
0 files changed, 0 insertions, 0 deletions
