about summary refs log tree commit diff
diff options
context:
space:
mode:
authorYuki Okushi <jtitor@2k36.org>2022-10-10 00:09:42 +0900
committerGitHub <noreply@github.com>2022-10-10 00:09:42 +0900
commit5ccf727344916695e52c9f708b405b5bd179e1e7 (patch)
tree0e110b4687287ae7fb92fe03967d671e9119ad4f
parent4013d367fea84c6e6c8c83c4f1719ff13e354820 (diff)
parent8e76d6687e48d9cfaa28553278540682cca6602c (diff)
downloadrust-5ccf727344916695e52c9f708b405b5bd179e1e7.tar.gz
rust-5ccf727344916695e52c9f708b405b5bd179e1e7.zip
Rollup merge of #102829 - compiler-errors:rename-impl-item-kind, r=TaKO8Ki
rename `ImplItemKind::TyAlias` to `ImplItemKind::Type`

The naming of this variant seems inconsistent given that this is not really a "type alias", and the associated type variant for `TraitItemKind` is just called `Type`.
-rw-r--r--clippy_lints/src/missing_inline.rs2
-rw-r--r--clippy_lints/src/types/mod.rs2
-rw-r--r--clippy_utils/src/check_proc_macro.rs2
3 files changed, 3 insertions, 3 deletions
diff --git a/clippy_lints/src/missing_inline.rs b/clippy_lints/src/missing_inline.rs
index 655df5419ac..01c87f058ad 100644
--- a/clippy_lints/src/missing_inline.rs
+++ b/clippy_lints/src/missing_inline.rs
@@ -148,7 +148,7 @@ impl<'tcx> LateLintPass<'tcx> for MissingInline {
 
         let desc = match impl_item.kind {
             hir::ImplItemKind::Fn(..) => "a method",
-            hir::ImplItemKind::Const(..) | hir::ImplItemKind::TyAlias(_) => return,
+            hir::ImplItemKind::Const(..) | hir::ImplItemKind::Type(_) => return,
         };
 
         let assoc_item = cx.tcx.associated_item(impl_item.def_id);
diff --git a/clippy_lints/src/types/mod.rs b/clippy_lints/src/types/mod.rs
index 79c31efb9fc..a06d1fffd8b 100644
--- a/clippy_lints/src/types/mod.rs
+++ b/clippy_lints/src/types/mod.rs
@@ -374,7 +374,7 @@ impl<'tcx> LateLintPass<'tcx> for Types {
             // Methods are covered by check_fn.
             // Type aliases are ignored because oftentimes it's impossible to
             // make type alias declaration in trait simpler, see #1013
-            ImplItemKind::Fn(..) | ImplItemKind::TyAlias(..) => (),
+            ImplItemKind::Fn(..) | ImplItemKind::Type(..) => (),
         }
     }
 
diff --git a/clippy_utils/src/check_proc_macro.rs b/clippy_utils/src/check_proc_macro.rs
index 7a8d4e8068e..c6bf98b7b8b 100644
--- a/clippy_utils/src/check_proc_macro.rs
+++ b/clippy_utils/src/check_proc_macro.rs
@@ -220,7 +220,7 @@ fn trait_item_search_pat(item: &TraitItem<'_>) -> (Pat, Pat) {
 fn impl_item_search_pat(item: &ImplItem<'_>) -> (Pat, Pat) {
     let (start_pat, end_pat) = match &item.kind {
         ImplItemKind::Const(..) => (Pat::Str("const"), Pat::Str(";")),
-        ImplItemKind::TyAlias(..) => (Pat::Str("type"), Pat::Str(";")),
+        ImplItemKind::Type(..) => (Pat::Str("type"), Pat::Str(";")),
         ImplItemKind::Fn(sig, ..) => (fn_header_search_pat(sig.header), Pat::Str("")),
     };
     if item.vis_span.is_empty() {