diff options
| author | Jacob Pratt <jacob@jhpratt.dev> | 2025-02-23 02:44:20 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-02-23 02:44:20 -0500 |
| commit | f5c6287d7680bfe169a06e430b84408925beadd1 (patch) | |
| tree | 1ce5ec7bf1318e497152890c51090deae2ca5605 | |
| parent | da493c91d65454b1c7d0fbd4d62ca5af5498a0b4 (diff) | |
| parent | 04c453c4bc4de30b41e3bd3ee7492d37b2cc3d89 (diff) | |
Rollup merge of #137448 - compiler-errors:control-flow-oops, r=scottmcm
Fix bugs due to unhandled `ControlFlow` in compiler Well, one bug and one nit.
| -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 31f75d3569c..cb83d405cc3 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) |
