diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-11-02 13:08:53 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2020-11-02 13:08:53 +0000 |
commit | 731b38fa3c1694648e6c8e60f61820f9783343eb (patch) | |
tree | b3f4e94e8eac9bb24296aacafacb100930bee59e /crates/proc_macro_api/src/process.rs | |
parent | 6507877e7039d4517682a4fc232356662f509d81 (diff) | |
parent | b6101184537b1165cfdd5fc473e04ad4c5b7bffa (diff) |
Merge #6438
6438: Deny unreachable-pub r=matklad a=matklad
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.
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/proc_macro_api/src/process.rs')
-rw-r--r-- | crates/proc_macro_api/src/process.rs | 8 |
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 | ||
32 | impl ProcMacroProcessSrv { | 32 | impl 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 | { |