mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-27 23:20:39 +00:00
parent
b5600c9852
commit
e59d619981
2 changed files with 3 additions and 3 deletions
|
@ -146,7 +146,7 @@ fn check_copy_clone<'a, 'tcx>(cx: &LateContext<'a, 'tcx>, item: &Item, trait_ref
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for subst in substs {
|
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 {
|
if let ty::Param(_) = subst.kind {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -36,7 +36,7 @@ use rustc::traits;
|
||||||
use rustc::ty::{
|
use rustc::ty::{
|
||||||
self,
|
self,
|
||||||
layout::{self, IntegerExt},
|
layout::{self, IntegerExt},
|
||||||
subst::Kind,
|
subst::GenericArg,
|
||||||
Binder, Ty, TyCtxt,
|
Binder, Ty, TyCtxt,
|
||||||
};
|
};
|
||||||
use rustc_errors::Applicability;
|
use rustc_errors::Applicability;
|
||||||
|
@ -307,7 +307,7 @@ pub fn implements_trait<'a, 'tcx>(
|
||||||
cx: &LateContext<'a, 'tcx>,
|
cx: &LateContext<'a, 'tcx>,
|
||||||
ty: Ty<'tcx>,
|
ty: Ty<'tcx>,
|
||||||
trait_id: DefId,
|
trait_id: DefId,
|
||||||
ty_params: &[Kind<'tcx>],
|
ty_params: &[GenericArg<'tcx>],
|
||||||
) -> bool {
|
) -> bool {
|
||||||
let ty = cx.tcx.erase_regions(&ty);
|
let ty = cx.tcx.erase_regions(&ty);
|
||||||
let obligation = cx.tcx.predicate_for_trait_def(
|
let obligation = cx.tcx.predicate_for_trait_def(
|
||||||
|
|
Loading…
Reference in a new issue