Skip to content

Commit 5ccf727

Browse files
authored
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`.
2 parents 4013d36 + 8e76d66 commit 5ccf727

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

clippy_lints/src/missing_inline.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ impl<'tcx> LateLintPass<'tcx> for MissingInline {
148148

149149
let desc = match impl_item.kind {
150150
hir::ImplItemKind::Fn(..) => "a method",
151-
hir::ImplItemKind::Const(..) | hir::ImplItemKind::TyAlias(_) => return,
151+
hir::ImplItemKind::Const(..) | hir::ImplItemKind::Type(_) => return,
152152
};
153153

154154
let assoc_item = cx.tcx.associated_item(impl_item.def_id);

clippy_lints/src/types/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,7 @@ impl<'tcx> LateLintPass<'tcx> for Types {
374374
// Methods are covered by check_fn.
375375
// Type aliases are ignored because oftentimes it's impossible to
376376
// make type alias declaration in trait simpler, see #1013
377-
ImplItemKind::Fn(..) | ImplItemKind::TyAlias(..) => (),
377+
ImplItemKind::Fn(..) | ImplItemKind::Type(..) => (),
378378
}
379379
}
380380

clippy_utils/src/check_proc_macro.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ fn trait_item_search_pat(item: &TraitItem<'_>) -> (Pat, Pat) {
220220
fn impl_item_search_pat(item: &ImplItem<'_>) -> (Pat, Pat) {
221221
let (start_pat, end_pat) = match &item.kind {
222222
ImplItemKind::Const(..) => (Pat::Str("const"), Pat::Str(";")),
223-
ImplItemKind::TyAlias(..) => (Pat::Str("type"), Pat::Str(";")),
223+
ImplItemKind::Type(..) => (Pat::Str("type"), Pat::Str(";")),
224224
ImplItemKind::Fn(sig, ..) => (fn_header_search_pat(sig.header), Pat::Str("")),
225225
};
226226
if item.vis_span.is_empty() {

0 commit comments

Comments
 (0)