diff --git a/crates/rust-analyzer/src/bin/main.rs b/crates/rust-analyzer/src/bin/main.rs index 97246cae6f0..c9e0951f829 100644 --- a/crates/rust-analyzer/src/bin/main.rs +++ b/crates/rust-analyzer/src/bin/main.rs @@ -1,7 +1,6 @@ //! Driver for rust-analyzer. //! //! Based on cli flags, either spawns an LSP server, or runs a batch analysis -mod flags; mod logger; mod rustc_wrapper; @@ -10,7 +9,7 @@ use lsp_server::Connection; use project_model::ProjectManifest; use rust_analyzer::{ - cli::{self, AnalysisStatsCmd}, + cli::{self, flags, AnalysisStatsCmd}, config::Config, from_json, lsp_ext::supports_utf8, diff --git a/crates/rust-analyzer/src/cli.rs b/crates/rust-analyzer/src/cli.rs index 2f65a1dad07..00302616973 100644 --- a/crates/rust-analyzer/src/cli.rs +++ b/crates/rust-analyzer/src/cli.rs @@ -1,5 +1,6 @@ //! Various batch processing tasks, intended primarily for debugging. +pub mod flags; pub mod load_cargo; mod analysis_stats; mod diagnostics; diff --git a/crates/rust-analyzer/src/bin/flags.rs b/crates/rust-analyzer/src/cli/flags.rs similarity index 98% rename from crates/rust-analyzer/src/bin/flags.rs rename to crates/rust-analyzer/src/cli/flags.rs index 19173241b28..f8babe4bc3d 100644 --- a/crates/rust-analyzer/src/bin/flags.rs +++ b/crates/rust-analyzer/src/cli/flags.rs @@ -3,7 +3,8 @@ use std::path::PathBuf; use ide_ssr::{SsrPattern, SsrRule}; -use rust_analyzer::cli::Verbosity; + +use crate::cli::Verbosity; xflags::xflags! { src "./src/bin/flags.rs" @@ -196,7 +197,7 @@ pub fn from_env() -> xflags::Result { // generated end impl RustAnalyzer { - pub(crate) fn verbosity(&self) -> Verbosity { + pub fn verbosity(&self) -> Verbosity { if self.quiet { return Verbosity::Quiet; }