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`.
This commit is contained in:
commit
5ccf727344
@ -148,7 +148,7 @@ fn check_impl_item(&mut self, cx: &LateContext<'tcx>, impl_item: &'tcx hir::Impl
|
||||
|
||||
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);
|
||||
|
@ -374,7 +374,7 @@ fn check_impl_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx ImplItem<'_>)
|
||||
// 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(..) => (),
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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() {
|
||||
|
Loading…
Reference in New Issue
Block a user