From b6101184537b1165cfdd5fc473e04ad4c5b7bffa Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Mon, 2 Nov 2020 13:13:32 +0100 Subject: Deny unreachable-pub It's very useful when `pub` is equivalent to "this is crate's public API", let's enforce this! Ideally, we should enforce it for local `cargo test`, and only during CI, but that needs https://github.com/rust-lang/cargo/issues/5034. --- crates/proc_macro_api/src/process.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'crates/proc_macro_api/src/process.rs') diff --git a/crates/proc_macro_api/src/process.rs b/crates/proc_macro_api/src/process.rs index 51ffcaa78..907cb3db7 100644 --- a/crates/proc_macro_api/src/process.rs +++ b/crates/proc_macro_api/src/process.rs @@ -30,7 +30,7 @@ pub(crate) struct ProcMacroProcessThread { } impl ProcMacroProcessSrv { - pub fn run( + pub(crate) fn run( process_path: PathBuf, args: impl IntoIterator>, ) -> io::Result<(ProcMacroProcessThread, ProcMacroProcessSrv)> { @@ -48,7 +48,7 @@ impl ProcMacroProcessSrv { Ok((thread, srv)) } - pub fn find_proc_macros( + pub(crate) fn find_proc_macros( &self, dylib_path: &Path, ) -> Result, tt::ExpansionError> { @@ -58,7 +58,7 @@ impl ProcMacroProcessSrv { Ok(result.macros) } - pub fn custom_derive( + pub(crate) fn custom_derive( &self, dylib_path: &Path, subtree: &Subtree, @@ -75,7 +75,7 @@ impl ProcMacroProcessSrv { Ok(result.expansion) } - pub fn send_task(&self, req: Request) -> Result + pub(crate) fn send_task(&self, req: Request) -> Result where R: TryFrom, { -- cgit v1.2.3