rust-clippy/tests
bors bef93d3b14 Auto merge of #7962 - Jarcho:fix_match_type_on_diagnostic_items, r=llogiq
Fix and improve `match_type_on_diagnostic_item`

This extracts the fix for the lint out of #7647. There's still a couple of other functions to check, but at least this will get lint working again.

The two added util functions (`is_diagnostic_item` and `is_lang_item`) are needed to handle `DefId` for unit and tuple struct/variant constructors. The `rustc_diagnostic_item` and `lang` attributes are attached to the struct/variant `DefId`, but most of the time they are used through their constructors which have a different `DefId`. The two utility functions will check if the `DefId` is for a constructor and switch to the associated struct/variant `DefId`.

There does seem to be a bug on rustc's side where constructor `DefId`s from external crates seem to be returning `DefKind::Variant` instead of `DefKind::Ctor()`. There's a workaround put in right.

changelog: None
2022-10-02 19:46:46 +00:00
..
test_utils Move/rename lazy::Sync{OnceCell,Lazy} to sync::{Once,Lazy}Lock 2022-06-16 19:54:42 +04:00
ui Auto merge of #9574 - Alexendoo:unused-fixed, r=Jarcho 2022-10-02 19:06:58 +00:00
ui-cargo Merge commit '7248d06384c6a90de58c04c1f46be88821278d8b' into sync-from-clippy 2022-09-21 13:13:27 -04:00
ui-internal Fix and improve internal lint checking for match_type usages 2022-10-02 15:02:55 -04:00
ui-toml [nonstandard_macro_braces] Do not modify macro arguments 2022-09-22 16:24:23 +02:00
workspace_test Merge commit '97a5daa65908e59744e2bc625b14849352231c75' into clippyup 2022-01-13 13:18:19 +01:00
check-fmt.rs Merge commit 'f51aade56f93175dde89177a92e3669ebd8e7592' into clippyup 2022-08-31 09:24:45 -04:00
clippy.toml
compile-test.rs a few more core lint fixes 2022-09-23 13:55:30 -04:00
dogfood.rs Fix adjacent code 2022-08-16 18:34:51 -04:00
integration.rs Fix panic when displaying the backtrace of failing integration tests 2022-09-25 09:15:29 -04:00
lint_message_convention.rs a few more core lint fixes 2022-09-23 13:55:30 -04:00
missing-test-files.rs a few more core lint fixes 2022-09-23 13:55:30 -04:00
versioncheck.rs a few more core lint fixes 2022-09-23 13:55:30 -04:00
workspace.rs Merge commit 'f51aade56f93175dde89177a92e3669ebd8e7592' into clippyup 2022-08-31 09:24:45 -04:00