diff options
| author | Michael Goulet <michael@errs.io> | 2025-04-23 16:03:55 +0000 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2025-05-07 16:00:21 +0000 |
| commit | 303c4ecfdd0c571d80c5bc151243aee1900cebfd (patch) | |
| tree | 8c1057437ad7f360e9b18589c6b8cf920c8cc8f5 | |
| parent | 874ad22b7479a28d78116d9ec4dcba5ac3e6f5e4 (diff) | |
| download | rust-303c4ecfdd0c571d80c5bc151243aee1900cebfd.tar.gz rust-303c4ecfdd0c571d80c5bc151243aee1900cebfd.zip | |
Require T: TypeFoldable in Binder<T> visit
| -rw-r--r-- | clippy_utils/src/ty/mod.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/clippy_utils/src/ty/mod.rs b/clippy_utils/src/ty/mod.rs index 8db9cd593b3..da09edd7f7c 100644 --- a/clippy_utils/src/ty/mod.rs +++ b/clippy_utils/src/ty/mod.rs @@ -20,8 +20,8 @@ use rustc_middle::traits::EvaluationResult; use rustc_middle::ty::layout::ValidityRequirement; use rustc_middle::ty::{ self, AdtDef, AliasTy, AssocItem, AssocTag, Binder, BoundRegion, FnSig, GenericArg, GenericArgKind, GenericArgsRef, - GenericParamDefKind, IntTy, ParamEnv, Region, RegionKind, TraitRef, Ty, TyCtxt, TypeSuperVisitable, TypeVisitable, - TypeVisitableExt, TypeVisitor, UintTy, Upcast, VariantDef, VariantDiscr, + GenericParamDefKind, IntTy, ParamEnv, Region, RegionKind, TraitRef, Ty, TyCtxt, TypeFoldable, TypeSuperVisitable, + TypeVisitable, TypeVisitableExt, TypeVisitor, UintTy, Upcast, VariantDef, VariantDiscr, }; use rustc_span::symbol::Ident; use rustc_span::{DUMMY_SP, Span, Symbol, sym}; @@ -915,7 +915,7 @@ pub fn for_each_top_level_late_bound_region<B>( ControlFlow::Continue(()) } } - fn visit_binder<T: TypeVisitable<TyCtxt<'tcx>>>(&mut self, t: &Binder<'tcx, T>) -> Self::Result { + fn visit_binder<T: TypeFoldable<TyCtxt<'tcx>>>(&mut self, t: &Binder<'tcx, T>) -> Self::Result { self.index += 1; let res = t.super_visit_with(self); self.index -= 1; |
