diff options
| author | Camille GILLOT <gillot.camille@gmail.com> | 2025-07-13 13:23:58 +0000 |
|---|---|---|
| committer | Camille GILLOT <gillot.camille@gmail.com> | 2025-07-13 13:50:00 +0000 |
| commit | ad6e587e838b1197596063f7efca1c65978a985e (patch) | |
| tree | 2aae4bbf9d70fa690fe2758888d42c9bbdce5a53 /compiler/rustc_ty_utils/src | |
| parent | 0fb279be1d96464c69209053ef0f97ad63088cda (diff) | |
| download | rust-ad6e587e838b1197596063f7efca1c65978a985e.tar.gz rust-ad6e587e838b1197596063f7efca1c65978a985e.zip | |
Remove usused depth.
Diffstat (limited to 'compiler/rustc_ty_utils/src')
| -rw-r--r-- | compiler/rustc_ty_utils/src/assoc.rs | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/compiler/rustc_ty_utils/src/assoc.rs b/compiler/rustc_ty_utils/src/assoc.rs index 66c44f72f4e..d71e8982871 100644 --- a/compiler/rustc_ty_utils/src/assoc.rs +++ b/compiler/rustc_ty_utils/src/assoc.rs @@ -137,12 +137,10 @@ struct RPITVisitor<'a, 'tcx> { synthetics: Vec<LocalDefId>, data: DefPathData, disambiguator: &'a mut DisambiguatorState, - depth: u32, } impl<'tcx> Visitor<'tcx> for RPITVisitor<'_, 'tcx> { fn visit_opaque_ty(&mut self, opaque: &'tcx hir::OpaqueTy<'tcx>) -> Self::Result { - self.depth += 1; self.synthetics.push(associated_type_for_impl_trait_in_trait( self.tcx, opaque.def_id, @@ -172,8 +170,7 @@ fn associated_types_for_impl_traits_in_trait_or_impl<'tcx>( }; let def_name = tcx.item_name(fn_def_id.to_def_id()); let data = DefPathData::AnonAssocTy(def_name); - let mut visitor = - RPITVisitor { tcx, synthetics: vec![], data, depth: 0, disambiguator }; + let mut visitor = RPITVisitor { tcx, synthetics: vec![], data, disambiguator }; visitor.visit_fn_ret_ty(output); let defs = visitor .synthetics |
