X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=clippy_lints%2Fsrc%2Ftypes%2Fmod.rs;h=69cd49d884cc00ae91674369eeae38cf86c5ac5d;hb=063f8aa094a740b98b0dab49d8361441c8f1d0c4;hp=5a7ef760a3025dcbf890a3175fe1d31200fed05c;hpb=46687f1313454882df10609e12d47f997501962d;p=rust.git diff --git a/clippy_lints/src/types/mod.rs b/clippy_lints/src/types/mod.rs index 5a7ef760a30..69cd49d884c 100644 --- a/clippy_lints/src/types/mod.rs +++ b/clippy_lints/src/types/mod.rs @@ -350,7 +350,7 @@ fn check_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx Item<'_>) { fn check_impl_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx ImplItem<'_>) { match item.kind { - ImplItemKind::Const(ty, _) | ImplItemKind::TyAlias(ty) => self.check_ty( + ImplItemKind::Const(ty, _) => self.check_ty( cx, ty, CheckTyContext { @@ -358,8 +358,10 @@ fn check_impl_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx ImplItem<'_>) ..CheckTyContext::default() }, ), - // methods are covered by check_fn - ImplItemKind::Fn(..) => (), + // 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(..) => (), } }