diff options
| author | Jason Newcomb <jsnewcomb@pm.me> | 2024-02-24 17:22:28 -0500 |
|---|---|---|
| committer | Jason Newcomb <jsnewcomb@pm.me> | 2024-03-05 13:28:15 -0500 |
| commit | 0901b9fecf32c7dd84c83c454d30cbce11cbf2ea (patch) | |
| tree | 425992639de3bc52f3b833c005dc086f1ecf6666 /clippy_lints/src | |
| parent | ae710de635e074d86ac0df873842087f67c2c3d4 (diff) | |
| download | rust-0901b9fecf32c7dd84c83c454d30cbce11cbf2ea.tar.gz rust-0901b9fecf32c7dd84c83c454d30cbce11cbf2ea.zip | |
Convert `TypeVisitor` and `DefIdVisitor` to use `VisitorResult`
Diffstat (limited to 'clippy_lints/src')
| -rw-r--r-- | clippy_lints/src/methods/useless_asref.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clippy_lints/src/methods/useless_asref.rs b/clippy_lints/src/methods/useless_asref.rs index 514015af045..b8baad18cc8 100644 --- a/clippy_lints/src/methods/useless_asref.rs +++ b/clippy_lints/src/methods/useless_asref.rs @@ -22,9 +22,9 @@ fn get_enum_ty(enum_ty: Ty<'_>) -> Option<Ty<'_>> { } impl<'tcx> TypeVisitor<TyCtxt<'tcx>> for ContainsTyVisitor { - type BreakTy = Ty<'tcx>; + type Result = ControlFlow<Ty<'tcx>>; - fn visit_ty(&mut self, t: Ty<'tcx>) -> ControlFlow<Self::BreakTy> { + fn visit_ty(&mut self, t: Ty<'tcx>) -> Self::Result { self.level += 1; if self.level == 1 { t.super_visit_with(self) |
