aboutsummaryrefslogtreecommitdiff
path: root/crates/proc_macro_api/src/process.rs
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2020-11-02 12:13:32 +0000
committerAleksey Kladov <[email protected]>2020-11-02 13:07:08 +0000
commitb6101184537b1165cfdd5fc473e04ad4c5b7bffa (patch)
treebcc2efd8a2696840a4724ad88758e973ecb77157 /crates/proc_macro_api/src/process.rs
parente7f90866bcf4b04a11e958eda0ac53f7ff0a607b (diff)
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.
Diffstat (limited to 'crates/proc_macro_api/src/process.rs')
-rw-r--r--crates/proc_macro_api/src/process.rs8
1 files changed, 4 insertions, 4 deletions
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 {
30} 30}
31 31
32impl ProcMacroProcessSrv { 32impl ProcMacroProcessSrv {
33 pub fn run( 33 pub(crate) fn run(
34 process_path: PathBuf, 34 process_path: PathBuf,
35 args: impl IntoIterator<Item = impl AsRef<OsStr>>, 35 args: impl IntoIterator<Item = impl AsRef<OsStr>>,
36 ) -> io::Result<(ProcMacroProcessThread, ProcMacroProcessSrv)> { 36 ) -> io::Result<(ProcMacroProcessThread, ProcMacroProcessSrv)> {
@@ -48,7 +48,7 @@ impl ProcMacroProcessSrv {
48 Ok((thread, srv)) 48 Ok((thread, srv))
49 } 49 }
50 50
51 pub fn find_proc_macros( 51 pub(crate) fn find_proc_macros(
52 &self, 52 &self,
53 dylib_path: &Path, 53 dylib_path: &Path,
54 ) -> Result<Vec<(String, ProcMacroKind)>, tt::ExpansionError> { 54 ) -> Result<Vec<(String, ProcMacroKind)>, tt::ExpansionError> {
@@ -58,7 +58,7 @@ impl ProcMacroProcessSrv {
58 Ok(result.macros) 58 Ok(result.macros)
59 } 59 }
60 60
61 pub fn custom_derive( 61 pub(crate) fn custom_derive(
62 &self, 62 &self,
63 dylib_path: &Path, 63 dylib_path: &Path,
64 subtree: &Subtree, 64 subtree: &Subtree,
@@ -75,7 +75,7 @@ impl ProcMacroProcessSrv {
75 Ok(result.expansion) 75 Ok(result.expansion)
76 } 76 }
77 77
78 pub fn send_task<R>(&self, req: Request) -> Result<R, tt::ExpansionError> 78 pub(crate) fn send_task<R>(&self, req: Request) -> Result<R, tt::ExpansionError>
79 where 79 where
80 R: TryFrom<Response, Error = &'static str>, 80 R: TryFrom<Response, Error = &'static str>,
81 { 81 {