Skip to content

Commit f5c6287

Browse files
authored
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.
2 parents da493c9 + 04c453c commit f5c6287

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

compiler/rustc_lint/src/types.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1587,7 +1587,7 @@ impl<'a, 'tcx> ImproperCTypesVisitor<'a, 'tcx> {
15871587
}
15881588

15891589
impl<'a, 'b, 'tcx> ty::visit::TypeVisitor<TyCtxt<'tcx>> for FnPtrFinder<'a, 'b, 'tcx> {
1590-
type Result = ControlFlow<Ty<'tcx>>;
1590+
type Result = ();
15911591

15921592
fn visit_ty(&mut self, ty: Ty<'tcx>) -> Self::Result {
15931593
if let ty::FnPtr(_, hdr) = ty.kind()

compiler/stable_mir/src/visitor.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ impl Visitable for RigidTy {
161161
RigidTy::Slice(inner) => inner.visit(visitor),
162162
RigidTy::RawPtr(ty, _) => ty.visit(visitor),
163163
RigidTy::Ref(reg, ty, _) => {
164-
reg.visit(visitor);
164+
reg.visit(visitor)?;
165165
ty.visit(visitor)
166166
}
167167
RigidTy::Adt(_, args)

0 commit comments

Comments
 (0)