pub(in solve) trait OverflowHandler<'tcx> {
// Required method
fn search_graph(&mut self) -> &mut SearchGraph<'tcx>;
// Provided methods
fn repeat_while_none<T>(
&mut self,
on_overflow: impl FnOnce(&mut Self) -> Result<T, NoSolution>,
loop_body: impl FnMut(&mut Self) -> Option<Result<T, NoSolution>>
) -> Result<T, NoSolution> { ... }
fn with_incremented_depth<T>(
&mut self,
on_overflow: impl FnOnce(&mut Self) -> T,
body: impl FnOnce(&mut Self) -> T
) -> T { ... }
}