diff --git a/clippy_lints/src/derive.rs b/clippy_lints/src/derive.rs index 6be04dfa687bc..ab9568931442e 100644 --- a/clippy_lints/src/derive.rs +++ b/clippy_lints/src/derive.rs @@ -146,7 +146,7 @@ fn check_copy_clone<'a, 'tcx>(cx: &LateContext<'a, 'tcx>, item: &Item, trait_ref } } for subst in substs { - if let ty::subst::UnpackedKind::Type(subst) = subst.unpack() { + if let ty::subst::GenericArgKind::Type(subst) = subst.unpack() { if let ty::Param(_) = subst.kind { return; } diff --git a/clippy_lints/src/utils/mod.rs b/clippy_lints/src/utils/mod.rs index 235c083dbe034..f98ff14b892b3 100644 --- a/clippy_lints/src/utils/mod.rs +++ b/clippy_lints/src/utils/mod.rs @@ -36,7 +36,7 @@ use rustc::traits; use rustc::ty::{ self, layout::{self, IntegerExt}, - subst::Kind, + subst::GenericArg, Binder, Ty, TyCtxt, }; use rustc_errors::Applicability; @@ -307,7 +307,7 @@ pub fn implements_trait<'a, 'tcx>( cx: &LateContext<'a, 'tcx>, ty: Ty<'tcx>, trait_id: DefId, - ty_params: &[Kind<'tcx>], + ty_params: &[GenericArg<'tcx>], ) -> bool { let ty = cx.tcx.erase_regions(&ty); let obligation = cx.tcx.predicate_for_trait_def(