about summary refs log tree commit diff
path: root/compiler/rustc_interface/src
diff options
context:
space:
mode:
authorNicholas Nethercote <n.nethercote@gmail.com>2022-10-07 15:35:42 +1100
committerNicholas Nethercote <n.nethercote@gmail.com>2022-10-19 07:23:14 +1100
commitdcc194e4bfb879220306538efe2666b0381b11c1 (patch)
tree38c85570fecbb74569df2a4a4bba45d2d707fc25 /compiler/rustc_interface/src
parent134e9d36ce5316c0da61923c0182dc547db9ba46 (diff)
downloadrust-dcc194e4bfb879220306538efe2666b0381b11c1.tar.gz
rust-dcc194e4bfb879220306538efe2666b0381b11c1.zip
Reduce visibility of some functions.
Diffstat (limited to 'compiler/rustc_interface/src')
-rw-r--r--compiler/rustc_interface/src/interface.rs2
-rw-r--r--compiler/rustc_interface/src/util.rs4
2 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_interface/src/interface.rs b/compiler/rustc_interface/src/interface.rs
index 134934c7ca6..71d59c76dbc 100644
--- a/compiler/rustc_interface/src/interface.rs
+++ b/compiler/rustc_interface/src/interface.rs
@@ -275,7 +275,7 @@ pub struct Config {
     pub registry: Registry,
 }
 
-pub fn create_compiler_and_run<R>(config: Config, f: impl FnOnce(&Compiler) -> R) -> R {
+fn create_compiler_and_run<R>(config: Config, f: impl FnOnce(&Compiler) -> R) -> R {
     crate::callbacks::setup_callbacks();
 
     let registry = &config.registry;
diff --git a/compiler/rustc_interface/src/util.rs b/compiler/rustc_interface/src/util.rs
index fa2a085f53c..c07d562332b 100644
--- a/compiler/rustc_interface/src/util.rs
+++ b/compiler/rustc_interface/src/util.rs
@@ -131,7 +131,7 @@ fn get_stack_size() -> Option<usize> {
 }
 
 #[cfg(not(parallel_compiler))]
-pub fn run_in_thread_pool_with_globals<F: FnOnce() -> R + Send, R: Send>(
+pub(crate) fn run_in_thread_pool_with_globals<F: FnOnce() -> R + Send, R: Send>(
     edition: Edition,
     _threads: usize,
     f: F,
@@ -169,7 +169,7 @@ unsafe fn handle_deadlock() {
 }
 
 #[cfg(parallel_compiler)]
-pub fn run_in_thread_pool_with_globals<F: FnOnce() -> R + Send, R: Send>(
+pub(crate) fn run_in_thread_pool_with_globals<F: FnOnce() -> R + Send, R: Send>(
     edition: Edition,
     threads: usize,
     f: F,