diff options
| author | Thibaud <ThibsG@users.noreply.github.com> | 2020-08-28 09:31:12 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-08-28 09:31:12 +0200 |
| commit | e8be047c5b2d5b1522a16b4b52cc7acfa4581ca3 (patch) | |
| tree | 29ccb5e719dc704ca8f555283d44cd3c3be2b5ff | |
| parent | 504612622f2801b43dbe3e6788d2404d394376df (diff) | |
| download | rust-e8be047c5b2d5b1522a16b4b52cc7acfa4581ca3.tar.gz rust-e8be047c5b2d5b1522a16b4b52cc7acfa4581ca3.zip | |
Update clippy_lints/src/utils/mod.rs
Co-authored-by: Eduardo Broto <ebroto@tutanota.com>
| -rw-r--r-- | clippy_lints/src/utils/mod.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clippy_lints/src/utils/mod.rs b/clippy_lints/src/utils/mod.rs index 07ec59f452a..d9598c4abbd 100644 --- a/clippy_lints/src/utils/mod.rs +++ b/clippy_lints/src/utils/mod.rs @@ -868,7 +868,7 @@ pub fn return_ty<'tcx>(cx: &LateContext<'tcx>, fn_item: hir::HirId) -> Ty<'tcx> } /// Walk into `ty` and returns `true` if any inner type is the same as `other_ty` -pub fn contains_ty<'tcx>(ty: Ty<'tcx>, other_ty: Ty<'tcx>) -> bool { +pub fn contains_ty(ty: Ty<'_>, other_ty: Ty<'_>) -> bool { ty.walk().any(|inner| match inner.unpack() { GenericArgKind::Type(inner_ty) => ty::TyS::same_type(other_ty, inner_ty), GenericArgKind::Lifetime(_) | GenericArgKind::Const(_) => false, |
