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/hir_def/src/nameres/collector.rs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'crates/hir_def/src/nameres') diff --git a/crates/hir_def/src/nameres/collector.rs b/crates/hir_def/src/nameres/collector.rs index 1ff45d244..59b6644c3 100644 --- a/crates/hir_def/src/nameres/collector.rs +++ b/crates/hir_def/src/nameres/collector.rs @@ -122,13 +122,13 @@ enum ImportSource { #[derive(Clone, Debug, Eq, PartialEq)] struct Import { - pub path: ModPath, - pub alias: Option, - pub visibility: RawVisibility, - pub is_glob: bool, - pub is_prelude: bool, - pub is_extern_crate: bool, - pub is_macro_use: bool, + path: ModPath, + alias: Option, + visibility: RawVisibility, + is_glob: bool, + is_prelude: bool, + is_extern_crate: bool, + is_macro_use: bool, source: ImportSource, } -- cgit v1.2.3