Skip to content

Commit 857ea16

Browse files
committed
Remove associated opaque types
They're unused now.
1 parent 8db2484 commit 857ea16

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

clippy_lints/src/lifetimes.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,7 @@ impl<'a, 'tcx> Visitor<'tcx> for RefVisitor<'a, 'tcx> {
379379
TyKind::Path(ref path) => {
380380
self.collect_anonymous_lifetimes(path, ty);
381381
},
382-
TyKind::Def(item, _) => {
382+
TyKind::OpaqueDef(item, _) => {
383383
let map = self.cx.tcx.hir();
384384
if let ItemKind::OpaqueTy(ref exist_ty) = map.expect_item(item.id).kind {
385385
for bound in exist_ty.bounds {

clippy_lints/src/manual_async_fn.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for ManualAsyncFn {
9999

100100
fn future_trait_ref<'tcx>(cx: &LateContext<'_, 'tcx>, ty: &'tcx Ty<'tcx>) -> Option<&'tcx TraitRef<'tcx>> {
101101
if_chain! {
102-
if let TyKind::Def(item_id, _) = ty.kind;
102+
if let TyKind::OpaqueDef(item_id, _) = ty.kind;
103103
let item = cx.tcx.hir().item(item_id.id);
104104
if let ItemKind::OpaqueTy(opaque) = &item.kind;
105105
if opaque.bounds.len() == 1;

clippy_lints/src/utils/hir_utils.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -710,7 +710,7 @@ impl<'a, 'tcx> SpanlessHash<'a, 'tcx> {
710710
segment.ident.name.hash(&mut self.s);
711711
},
712712
},
713-
TyKind::Def(_, arg_list) => {
713+
TyKind::OpaqueDef(_, arg_list) => {
714714
for arg in *arg_list {
715715
match arg {
716716
GenericArg::Lifetime(ref l) => self.hash_lifetime(l),

0 commit comments

Comments
 (0)