diff options
| author | Michael Goulet <michael@errs.io> | 2025-02-22 23:54:08 +0000 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2025-02-22 23:56:14 +0000 |
| commit | 04c453c4bc4de30b41e3bd3ee7492d37b2cc3d89 (patch) | |
| tree | 198a997df20ee7059bb75f4da578151387536d61 | |
| parent | 794c12416b2138064af1f2746646973fafd9419d (diff) | |
| download | rust-04c453c4bc4de30b41e3bd3ee7492d37b2cc3d89.tar.gz rust-04c453c4bc4de30b41e3bd3ee7492d37b2cc3d89.zip | |
Fix bugs due to unhandled ControlFlow
| -rw-r--r-- | compiler/rustc_lint/src/types.rs | 2 | ||||
| -rw-r--r-- | compiler/stable_mir/src/visitor.rs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_lint/src/types.rs b/compiler/rustc_lint/src/types.rs index 68b1f435a4c..3ec61cdf41a 100644 --- a/compiler/rustc_lint/src/types.rs +++ b/compiler/rustc_lint/src/types.rs @@ -1587,7 +1587,7 @@ impl<'a, 'tcx> ImproperCTypesVisitor<'a, 'tcx> { } impl<'a, 'b, 'tcx> ty::visit::TypeVisitor<TyCtxt<'tcx>> for FnPtrFinder<'a, 'b, 'tcx> { - type Result = ControlFlow<Ty<'tcx>>; + type Result = (); fn visit_ty(&mut self, ty: Ty<'tcx>) -> Self::Result { if let ty::FnPtr(_, hdr) = ty.kind() diff --git a/compiler/stable_mir/src/visitor.rs b/compiler/stable_mir/src/visitor.rs index 3533ed2e851..8463174f9a4 100644 --- a/compiler/stable_mir/src/visitor.rs +++ b/compiler/stable_mir/src/visitor.rs @@ -161,7 +161,7 @@ impl Visitable for RigidTy { RigidTy::Slice(inner) => inner.visit(visitor), RigidTy::RawPtr(ty, _) => ty.visit(visitor), RigidTy::Ref(reg, ty, _) => { - reg.visit(visitor); + reg.visit(visitor)?; ty.visit(visitor) } RigidTy::Adt(_, args) |
