diff options
| author | bors <bors@rust-lang.org> | 2024-03-05 21:10:59 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-03-05 21:10:59 +0000 |
| commit | b6d2d841bcf4b77343b159f134c7d39c2dd4ceaa (patch) | |
| tree | bdc2b586862355af3ae43eb1fb58fbb2d2baa4b2 /compiler/rustc_const_eval/src/interpret/util.rs | |
| parent | 3c029725f5a198f4ccb1332bece98c2b50dbce01 (diff) | |
| parent | 228eb38c6951ea5d0da2830f278422ad912f8795 (diff) | |
Auto merge of #121576 - Jarcho:visitor3, r=oli-obk
Convert the rest of the visitors to use `VisitorResult` Continuing from #121256.
Diffstat (limited to 'compiler/rustc_const_eval/src/interpret/util.rs')
| -rw-r--r-- | compiler/rustc_const_eval/src/interpret/util.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_const_eval/src/interpret/util.rs b/compiler/rustc_const_eval/src/interpret/util.rs index 2a13671a829..3427368421f 100644 --- a/compiler/rustc_const_eval/src/interpret/util.rs +++ b/compiler/rustc_const_eval/src/interpret/util.rs @@ -30,9 +30,9 @@ where } impl<'tcx> TypeVisitor<TyCtxt<'tcx>> for UsedParamsNeedInstantiationVisitor<'tcx> { - type BreakTy = FoundParam; + type Result = ControlFlow<FoundParam>; - fn visit_ty(&mut self, ty: Ty<'tcx>) -> ControlFlow<Self::BreakTy> { + fn visit_ty(&mut self, ty: Ty<'tcx>) -> Self::Result { if !ty.has_param() { return ControlFlow::Continue(()); } @@ -64,7 +64,7 @@ where } } - fn visit_const(&mut self, c: ty::Const<'tcx>) -> ControlFlow<Self::BreakTy> { + fn visit_const(&mut self, c: ty::Const<'tcx>) -> Self::Result { match c.kind() { ty::ConstKind::Param(..) => ControlFlow::Break(FoundParam), _ => c.super_visit_with(self), |
