diff options
| author | Matthew Jasper <mjjasper1@gmail.com> | 2020-05-10 12:15:51 +0100 |
|---|---|---|
| committer | Matthew Jasper <mjjasper1@gmail.com> | 2020-06-11 16:24:01 +0100 |
| commit | 857ea16feb6a3891555d032a0ff7d5d7c0e33b32 (patch) | |
| tree | 5c3f3c23b6f3e6753e410e666f7f7a2c67038ab5 | |
| parent | 8db24840f7457f005cb73807197992922ca960b1 (diff) | |
| download | rust-857ea16feb6a3891555d032a0ff7d5d7c0e33b32.tar.gz rust-857ea16feb6a3891555d032a0ff7d5d7c0e33b32.zip | |
Remove associated opaque types
They're unused now.
| -rw-r--r-- | clippy_lints/src/lifetimes.rs | 2 | ||||
| -rw-r--r-- | clippy_lints/src/manual_async_fn.rs | 2 | ||||
| -rw-r--r-- | clippy_lints/src/utils/hir_utils.rs | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/clippy_lints/src/lifetimes.rs b/clippy_lints/src/lifetimes.rs index d80ad47ab24..318d0b69d57 100644 --- a/clippy_lints/src/lifetimes.rs +++ b/clippy_lints/src/lifetimes.rs @@ -379,7 +379,7 @@ impl<'a, 'tcx> Visitor<'tcx> for RefVisitor<'a, 'tcx> { TyKind::Path(ref path) => { self.collect_anonymous_lifetimes(path, ty); }, - TyKind::Def(item, _) => { + TyKind::OpaqueDef(item, _) => { let map = self.cx.tcx.hir(); if let ItemKind::OpaqueTy(ref exist_ty) = map.expect_item(item.id).kind { for bound in exist_ty.bounds { diff --git a/clippy_lints/src/manual_async_fn.rs b/clippy_lints/src/manual_async_fn.rs index cb72a240582..03ab274d9ca 100644 --- a/clippy_lints/src/manual_async_fn.rs +++ b/clippy_lints/src/manual_async_fn.rs @@ -99,7 +99,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for ManualAsyncFn { fn future_trait_ref<'tcx>(cx: &LateContext<'_, 'tcx>, ty: &'tcx Ty<'tcx>) -> Option<&'tcx TraitRef<'tcx>> { if_chain! { - if let TyKind::Def(item_id, _) = ty.kind; + if let TyKind::OpaqueDef(item_id, _) = ty.kind; let item = cx.tcx.hir().item(item_id.id); if let ItemKind::OpaqueTy(opaque) = &item.kind; if opaque.bounds.len() == 1; diff --git a/clippy_lints/src/utils/hir_utils.rs b/clippy_lints/src/utils/hir_utils.rs index f8d197c15e8..0096543c1fb 100644 --- a/clippy_lints/src/utils/hir_utils.rs +++ b/clippy_lints/src/utils/hir_utils.rs @@ -710,7 +710,7 @@ impl<'a, 'tcx> SpanlessHash<'a, 'tcx> { segment.ident.name.hash(&mut self.s); }, }, - TyKind::Def(_, arg_list) => { + TyKind::OpaqueDef(_, arg_list) => { for arg in *arg_list { match arg { GenericArg::Lifetime(ref l) => self.hash_lifetime(l), |
