1
Fork 0

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.
This commit is contained in:
Jacob Pratt 2025-02-23 02:44:20 -05:00 committed by GitHub
commit f5c6287d76
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View file

@ -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()

View file

@ -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)