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/base_db/src/input.rs | 4 +--- crates/base_db/src/lib.rs | 4 ++-- 2 files changed, 3 insertions(+), 5 deletions(-) (limited to 'crates/base_db') diff --git a/crates/base_db/src/input.rs b/crates/base_db/src/input.rs index 87f0a0ce5..31907ed98 100644 --- a/crates/base_db/src/input.rs +++ b/crates/base_db/src/input.rs @@ -12,9 +12,7 @@ use cfg::CfgOptions; use rustc_hash::{FxHashMap, FxHashSet}; use syntax::SmolStr; use tt::TokenExpander; -use vfs::{file_set::FileSet, VfsPath}; - -pub use vfs::FileId; +use vfs::{file_set::FileSet, FileId, VfsPath}; /// Files are grouped into source roots. A source root is a directory on the /// file systems which is watched for changes. Typically it corresponds to a diff --git a/crates/base_db/src/lib.rs b/crates/base_db/src/lib.rs index 0804202d6..ce75a5337 100644 --- a/crates/base_db/src/lib.rs +++ b/crates/base_db/src/lib.rs @@ -14,11 +14,11 @@ pub use crate::{ change::Change, input::{ CrateData, CrateDisplayName, CrateGraph, CrateId, CrateName, Dependency, Edition, Env, - FileId, ProcMacroId, SourceRoot, SourceRootId, + ProcMacroId, SourceRoot, SourceRootId, }, }; pub use salsa; -pub use vfs::{file_set::FileSet, VfsPath}; +pub use vfs::{file_set::FileSet, FileId, VfsPath}; #[macro_export] macro_rules! impl_intern_key { -- cgit v1.2.3