Skip to content

Commit e0c990e

Browse files
committed
Reduce some function exposure.
1 parent 3cf2a74 commit e0c990e

File tree

1 file changed

+8
-5
lines changed
  • compiler/rustc_incremental/src/persist

1 file changed

+8
-5
lines changed

compiler/rustc_incremental/src/persist/fs.rs

+8-5
Original file line numberDiff line numberDiff line change
@@ -136,26 +136,29 @@ const QUERY_CACHE_FILENAME: &str = "query-cache.bin";
136136
const INT_ENCODE_BASE: usize = base_n::CASE_INSENSITIVE;
137137

138138
/// Returns the path to a session's dependency graph.
139-
pub fn dep_graph_path(sess: &Session) -> PathBuf {
139+
pub(crate) fn dep_graph_path(sess: &Session) -> PathBuf {
140140
in_incr_comp_dir_sess(sess, DEP_GRAPH_FILENAME)
141141
}
142+
142143
/// Returns the path to a session's staging dependency graph.
143144
///
144145
/// On the difference between dep-graph and staging dep-graph,
145146
/// see `build_dep_graph`.
146-
pub fn staging_dep_graph_path(sess: &Session) -> PathBuf {
147+
pub(crate) fn staging_dep_graph_path(sess: &Session) -> PathBuf {
147148
in_incr_comp_dir_sess(sess, STAGING_DEP_GRAPH_FILENAME)
148149
}
149-
pub fn work_products_path(sess: &Session) -> PathBuf {
150+
151+
pub(crate) fn work_products_path(sess: &Session) -> PathBuf {
150152
in_incr_comp_dir_sess(sess, WORK_PRODUCTS_FILENAME)
151153
}
154+
152155
/// Returns the path to a session's query cache.
153156
pub fn query_cache_path(sess: &Session) -> PathBuf {
154157
in_incr_comp_dir_sess(sess, QUERY_CACHE_FILENAME)
155158
}
156159

157160
/// Locks a given session directory.
158-
pub fn lock_file_path(session_dir: &Path) -> PathBuf {
161+
fn lock_file_path(session_dir: &Path) -> PathBuf {
159162
let crate_dir = session_dir.parent().unwrap();
160163

161164
let directory_name = session_dir.file_name().unwrap().to_string_lossy();
@@ -373,7 +376,7 @@ pub fn finalize_session_directory(sess: &Session, svh: Option<Svh>) {
373376
let _ = garbage_collect_session_directories(sess);
374377
}
375378

376-
pub fn delete_all_session_dir_contents(sess: &Session) -> io::Result<()> {
379+
pub(crate) fn delete_all_session_dir_contents(sess: &Session) -> io::Result<()> {
377380
let sess_dir_iterator = sess.incr_comp_session_dir().read_dir()?;
378381
for entry in sess_dir_iterator {
379382
let entry = entry?;

0 commit comments

Comments
 (0)