mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-27 07:00:55 +00:00
ImplItemKind::TyAlias => ImplItemKind::Type
This commit is contained in:
parent
da16cc1da9
commit
8e76d6687e
3 changed files with 3 additions and 3 deletions
|
@ -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);
|
||||
|
|
|
@ -372,7 +372,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(..) => (),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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 a new issue