Skip to content

Commit 26136c6

Browse files
committed
Reduce visibility of some items
1 parent c8dae10 commit 26136c6

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

compiler/rustc_trait_selection/src/solve/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ use rustc_middle::ty::{
3131
};
3232
use rustc_span::DUMMY_SP;
3333

34-
use crate::solve::search_graph::overflow::OverflowHandler;
34+
use crate::solve::search_graph::OverflowHandler;
3535
use crate::traits::ObligationCause;
3636

3737
mod assembly;

compiler/rustc_trait_selection/src/solve/search_graph/mod.rs

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
mod cache;
2-
pub(crate) mod overflow;
2+
mod overflow;
33

44
use self::cache::ProvisionalEntry;
55
use super::{CanonicalGoal, Certainty, MaybeCause, QueryResult};
6-
use crate::solve::search_graph::overflow::OverflowHandler;
6+
pub(super) use crate::solve::search_graph::overflow::OverflowHandler;
77
use cache::ProvisionalCache;
88
use overflow::OverflowData;
99
use rustc_index::vec::IndexVec;
@@ -14,12 +14,12 @@ rustc_index::newtype_index! {
1414
pub struct StackDepth {}
1515
}
1616

17-
pub(crate) struct StackElem<'tcx> {
17+
struct StackElem<'tcx> {
1818
goal: CanonicalGoal<'tcx>,
1919
has_been_used: bool,
2020
}
2121

22-
pub(crate) struct SearchGraph<'tcx> {
22+
pub(super) struct SearchGraph<'tcx> {
2323
/// The stack of goals currently being computed.
2424
///
2525
/// An element is *deeper* in the stack if its index is *lower*.
@@ -47,7 +47,7 @@ impl<'tcx> SearchGraph<'tcx> {
4747
///
4848
/// This correctly updates the provisional cache if there is a cycle.
4949
#[instrument(level = "debug", skip(self, tcx), ret)]
50-
pub(super) fn try_push_stack(
50+
fn try_push_stack(
5151
&mut self,
5252
tcx: TyCtxt<'tcx>,
5353
goal: CanonicalGoal<'tcx>,
@@ -122,7 +122,7 @@ impl<'tcx> SearchGraph<'tcx> {
122122
///
123123
/// FIXME: Refer to the rustc-dev-guide entry once it exists.
124124
#[instrument(level = "debug", skip(self, tcx, actual_goal), ret)]
125-
pub(super) fn try_finalize_goal(
125+
fn try_finalize_goal(
126126
&mut self,
127127
tcx: TyCtxt<'tcx>,
128128
actual_goal: CanonicalGoal<'tcx>,
@@ -163,7 +163,7 @@ impl<'tcx> SearchGraph<'tcx> {
163163
}
164164
}
165165

166-
pub(super) fn try_move_finished_goal_to_global_cache(
166+
fn try_move_finished_goal_to_global_cache(
167167
&mut self,
168168
tcx: TyCtxt<'tcx>,
169169
stack_elem: StackElem<'tcx>,

compiler/rustc_trait_selection/src/solve/search_graph/overflow.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ impl OverflowData {
5050
}
5151
}
5252

53-
pub(crate) trait OverflowHandler<'tcx> {
53+
pub(in crate::solve) trait OverflowHandler<'tcx> {
5454
fn search_graph(&mut self) -> &mut SearchGraph<'tcx>;
5555

5656
fn repeat_while_none<T>(

0 commit comments

Comments
 (0)