about summary refs log tree commit diff
diff options
context:
space:
mode:
authorlcnr <rust@lcnr.de>2025-09-26 14:51:13 +0200
committerlcnr <rust@lcnr.de>2025-09-26 15:29:01 +0200
commit4e44d58bbc199ff7c17a98b283621a6df327d60f (patch)
tree72d05e25fd0aaeae93e650f343e1a96853ec5388
parent4a0c7cc730a5434574c41a6073d9efb92141af1a (diff)
downloadrust-4e44d58bbc199ff7c17a98b283621a6df327d60f.tar.gz
rust-4e44d58bbc199ff7c17a98b283621a6df327d60f.zip
rename `search_graph::Delegate` fns
-rw-r--r--compiler/rustc_next_trait_solver/src/solve/search_graph.rs4
-rw-r--r--compiler/rustc_type_ir/src/search_graph/mod.rs13
2 files changed, 10 insertions, 7 deletions
diff --git a/compiler/rustc_next_trait_solver/src/solve/search_graph.rs b/compiler/rustc_next_trait_solver/src/solve/search_graph.rs
index 4ae2af59a70..109c8476ccb 100644
--- a/compiler/rustc_next_trait_solver/src/solve/search_graph.rs
+++ b/compiler/rustc_next_trait_solver/src/solve/search_graph.rs
@@ -91,11 +91,11 @@ where
         }
     }
 
-    fn on_stack_overflow(cx: I, input: CanonicalInput<I>) -> QueryResult<I> {
+    fn stack_overflow_result(cx: I, input: CanonicalInput<I>) -> QueryResult<I> {
         response_no_constraints(cx, input, Certainty::overflow(true))
     }
 
-    fn on_fixpoint_overflow(cx: I, input: CanonicalInput<I>) -> QueryResult<I> {
+    fn fixpoint_overflow_result(cx: I, input: CanonicalInput<I>) -> QueryResult<I> {
         response_no_constraints(cx, input, Certainty::overflow(false))
     }
 
diff --git a/compiler/rustc_type_ir/src/search_graph/mod.rs b/compiler/rustc_type_ir/src/search_graph/mod.rs
index a7902cd0210..7aa58d096d5 100644
--- a/compiler/rustc_type_ir/src/search_graph/mod.rs
+++ b/compiler/rustc_type_ir/src/search_graph/mod.rs
@@ -87,8 +87,11 @@ pub trait Delegate: Sized {
         input: <Self::Cx as Cx>::Input,
     ) -> <Self::Cx as Cx>::Result;
     fn is_initial_provisional_result(result: <Self::Cx as Cx>::Result) -> Option<PathKind>;
-    fn on_stack_overflow(cx: Self::Cx, input: <Self::Cx as Cx>::Input) -> <Self::Cx as Cx>::Result;
-    fn on_fixpoint_overflow(
+    fn stack_overflow_result(
+        cx: Self::Cx,
+        input: <Self::Cx as Cx>::Input,
+    ) -> <Self::Cx as Cx>::Result;
+    fn fixpoint_overflow_result(
         cx: Self::Cx,
         input: <Self::Cx as Cx>::Input,
     ) -> <Self::Cx as Cx>::Result;
@@ -885,7 +888,7 @@ impl<D: Delegate<Cx = X>, X: Cx> SearchGraph<D> {
         }
 
         debug!("encountered stack overflow");
-        D::on_stack_overflow(cx, input)
+        D::stack_overflow_result(cx, input)
     }
 
     /// When reevaluating a goal with a changed provisional result, all provisional cache entry
@@ -1033,7 +1036,7 @@ impl<D: Delegate<Cx = X>, X: Cx> SearchGraph<D, X> {
                         RebaseReason::Ambiguity => {
                             *result = D::propagate_ambiguity(cx, input, *result);
                         }
-                        RebaseReason::Overflow => *result = D::on_fixpoint_overflow(cx, input),
+                        RebaseReason::Overflow => *result = D::fixpoint_overflow_result(cx, input),
                         RebaseReason::ReachedFixpoint(None) => {}
                         RebaseReason::ReachedFixpoint(Some(path_kind)) => {
                             if !popped_head.usages.is_single(path_kind) {
@@ -1362,7 +1365,7 @@ impl<D: Delegate<Cx = X>, X: Cx> SearchGraph<D, X> {
             i += 1;
             if i >= D::FIXPOINT_STEP_LIMIT {
                 debug!("canonical cycle overflow");
-                let result = D::on_fixpoint_overflow(cx, input);
+                let result = D::fixpoint_overflow_result(cx, input);
                 self.rebase_provisional_cache_entries(cx, &stack_entry, RebaseReason::Overflow);
                 return EvaluationResult::finalize(stack_entry, encountered_overflow, result);
             }