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/base_db | |
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/base_db')
-rw-r--r-- | crates/base_db/src/input.rs | 4 | ||||
-rw-r--r-- | crates/base_db/src/lib.rs | 4 |
2 files changed, 3 insertions, 5 deletions
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; | |||
12 | use rustc_hash::{FxHashMap, FxHashSet}; | 12 | use rustc_hash::{FxHashMap, FxHashSet}; |
13 | use syntax::SmolStr; | 13 | use syntax::SmolStr; |
14 | use tt::TokenExpander; | 14 | use tt::TokenExpander; |
15 | use vfs::{file_set::FileSet, VfsPath}; | 15 | use vfs::{file_set::FileSet, FileId, VfsPath}; |
16 | |||
17 | pub use vfs::FileId; | ||
18 | 16 | ||
19 | /// Files are grouped into source roots. A source root is a directory on the | 17 | /// Files are grouped into source roots. A source root is a directory on the |
20 | /// file systems which is watched for changes. Typically it corresponds to a | 18 | /// 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::{ | |||
14 | change::Change, | 14 | change::Change, |
15 | input::{ | 15 | input::{ |
16 | CrateData, CrateDisplayName, CrateGraph, CrateId, CrateName, Dependency, Edition, Env, | 16 | CrateData, CrateDisplayName, CrateGraph, CrateId, CrateName, Dependency, Edition, Env, |
17 | FileId, ProcMacroId, SourceRoot, SourceRootId, | 17 | ProcMacroId, SourceRoot, SourceRootId, |
18 | }, | 18 | }, |
19 | }; | 19 | }; |
20 | pub use salsa; | 20 | pub use salsa; |
21 | pub use vfs::{file_set::FileSet, VfsPath}; | 21 | pub use vfs::{file_set::FileSet, FileId, VfsPath}; |
22 | 22 | ||
23 | #[macro_export] | 23 | #[macro_export] |
24 | macro_rules! impl_intern_key { | 24 | macro_rules! impl_intern_key { |