@@ -31,8 +31,6 @@ xflags::xflags! {
3131 default cmd lsp-server {
3232 /// Print version.
3333 optional --version
34- /// Print help.
35- optional -h, --help
3634
3735 /// Dump a LSP config JSON schema.
3836 optional --print-config-schema
@@ -54,10 +52,10 @@ xflags::xflags! {
5452 }
5553
5654 /// Batch typecheck project and print summary statistics
57- cmd analysis-stats
55+ cmd analysis-stats {
5856 /// Directory with Cargo.toml.
5957 required path: PathBuf
60- {
58+
6159 optional --output format: OutputFormat
6260
6361 /// Randomize order in which crates, modules, and items are processed.
@@ -84,38 +82,37 @@ xflags::xflags! {
8482 optional --skip-inference
8583 }
8684
87- cmd diagnostics
85+ cmd diagnostics {
8886 /// Directory with Cargo.toml.
8987 required path: PathBuf
90- {
88+
9189 /// Don't run build scripts or load `OUT_DIR` values by running `cargo check` before analysis.
9290 optional --disable-build-scripts
9391 /// Don't use expand proc macros.
9492 optional --disable-proc-macros
9593 }
9694
97- cmd ssr
95+ cmd ssr {
9896 /// A structured search replace rule (`$a.foo($b) ==> bar($a, $b)`)
9997 repeated rule: SsrRule
100- { }
98+ }
10199
102- cmd search
100+ cmd search {
103101 /// A structured search replace pattern (`$a.foo($b)`)
104102 repeated pattern: SsrPattern
105- {
106103 /// Prints debug information for any nodes with source exactly equal to snippet.
107104 optional --debug snippet: String
108105 }
109106
110107 cmd proc-macro { }
111108
112- cmd lsif
109+ cmd lsif {
113110 required path: PathBuf
114- { }
111+ }
115112
116- cmd scip
113+ cmd scip {
117114 required path: PathBuf
118- { }
115+ }
119116 }
120117}
121118
@@ -150,7 +147,6 @@ pub enum RustAnalyzerCmd {
150147#[ derive( Debug ) ]
151148pub struct LspServer {
152149 pub version : bool ,
153- pub help : bool ,
154150 pub print_config_schema : bool ,
155151}
156152
@@ -218,7 +214,10 @@ pub struct Scip {
218214}
219215
220216impl RustAnalyzer {
221- pub const HELP : & ' static str = Self :: HELP_ ;
217+ #[ allow( dead_code) ]
218+ pub fn from_env_or_exit ( ) -> Self {
219+ Self :: from_env_or_exit_ ( )
220+ }
222221
223222 #[ allow( dead_code) ]
224223 pub fn from_env ( ) -> xflags:: Result < Self > {
0 commit comments