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.
This commit is contained in:
Aleksey Kladov
2020-11-02 13:13:32 +01:00
parent e7f90866bc
commit b610118453
34 changed files with 157 additions and 158 deletions

View File

@@ -30,7 +30,7 @@ pub(crate) struct ProcMacroProcessThread {
}
impl ProcMacroProcessSrv {
pub fn run(
pub(crate) fn run(
process_path: PathBuf,
args: impl IntoIterator<Item = impl AsRef<OsStr>>,
) -> 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<Vec<(String, ProcMacroKind)>, 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<R>(&self, req: Request) -> Result<R, tt::ExpansionError>
pub(crate) fn send_task<R>(&self, req: Request) -> Result<R, tt::ExpansionError>
where
R: TryFrom<Response, Error = &'static str>,
{