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/syntax/src/ast/generated.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'crates/syntax/src/ast/generated.rs') diff --git a/crates/syntax/src/ast/generated.rs b/crates/syntax/src/ast/generated.rs index 4a6f41ee7..843b43cf0 100644 --- a/crates/syntax/src/ast/generated.rs +++ b/crates/syntax/src/ast/generated.rs @@ -1,8 +1,8 @@ //! This file is actually hand-written, but the submodules are indeed generated. #[rustfmt::skip] -mod nodes; +pub(crate) mod nodes; #[rustfmt::skip] -mod tokens; +pub(crate) mod tokens; use crate::{ AstNode, @@ -10,7 +10,7 @@ use crate::{ SyntaxNode, }; -pub use {nodes::*, tokens::*}; +pub(crate) use nodes::*; // Stmt is the only nested enum, so it's easier to just hand-write it impl AstNode for Stmt { -- cgit v1.2.3