diff --git a/compiler/rustc_trait_selection/src/solve/mod.rs b/compiler/rustc_trait_selection/src/solve/mod.rs index d444ca69df1..32fcd751b46 100644 --- a/compiler/rustc_trait_selection/src/solve/mod.rs +++ b/compiler/rustc_trait_selection/src/solve/mod.rs @@ -31,7 +31,7 @@ use rustc_middle::ty::{ }; use rustc_span::DUMMY_SP; -use crate::solve::search_graph::overflow::OverflowHandler; +use crate::solve::search_graph::OverflowHandler; use crate::traits::ObligationCause; mod assembly; diff --git a/compiler/rustc_trait_selection/src/solve/search_graph/mod.rs b/compiler/rustc_trait_selection/src/solve/search_graph/mod.rs index 9b398ef0e62..e9945cde5df 100644 --- a/compiler/rustc_trait_selection/src/solve/search_graph/mod.rs +++ b/compiler/rustc_trait_selection/src/solve/search_graph/mod.rs @@ -1,9 +1,9 @@ mod cache; -pub(crate) mod overflow; +mod overflow; use self::cache::ProvisionalEntry; use super::{CanonicalGoal, Certainty, MaybeCause, QueryResult}; -use crate::solve::search_graph::overflow::OverflowHandler; +pub(super) use crate::solve::search_graph::overflow::OverflowHandler; use cache::ProvisionalCache; use overflow::OverflowData; use rustc_index::vec::IndexVec; @@ -14,12 +14,12 @@ rustc_index::newtype_index! { pub struct StackDepth {} } -pub(crate) struct StackElem<'tcx> { +struct StackElem<'tcx> { goal: CanonicalGoal<'tcx>, has_been_used: bool, } -pub(crate) struct SearchGraph<'tcx> { +pub(super) struct SearchGraph<'tcx> { /// The stack of goals currently being computed. /// /// An element is *deeper* in the stack if its index is *lower*. @@ -47,7 +47,7 @@ impl<'tcx> SearchGraph<'tcx> { /// /// This correctly updates the provisional cache if there is a cycle. #[instrument(level = "debug", skip(self, tcx), ret)] - pub(super) fn try_push_stack( + fn try_push_stack( &mut self, tcx: TyCtxt<'tcx>, goal: CanonicalGoal<'tcx>, @@ -122,7 +122,7 @@ impl<'tcx> SearchGraph<'tcx> { /// /// FIXME: Refer to the rustc-dev-guide entry once it exists. #[instrument(level = "debug", skip(self, tcx, actual_goal), ret)] - pub(super) fn try_finalize_goal( + fn try_finalize_goal( &mut self, tcx: TyCtxt<'tcx>, actual_goal: CanonicalGoal<'tcx>, @@ -163,7 +163,7 @@ impl<'tcx> SearchGraph<'tcx> { } } - pub(super) fn try_move_finished_goal_to_global_cache( + fn try_move_finished_goal_to_global_cache( &mut self, tcx: TyCtxt<'tcx>, stack_elem: StackElem<'tcx>, diff --git a/compiler/rustc_trait_selection/src/solve/search_graph/overflow.rs b/compiler/rustc_trait_selection/src/solve/search_graph/overflow.rs index ea62152789e..56409b0602b 100644 --- a/compiler/rustc_trait_selection/src/solve/search_graph/overflow.rs +++ b/compiler/rustc_trait_selection/src/solve/search_graph/overflow.rs @@ -50,7 +50,7 @@ impl OverflowData { } } -pub(crate) trait OverflowHandler<'tcx> { +pub(in crate::solve) trait OverflowHandler<'tcx> { fn search_graph(&mut self) -> &mut SearchGraph<'tcx>; fn repeat_while_none(