@@ -31,8 +31,6 @@ xflags::xflags! {
31
31
default cmd lsp-server {
32
32
/// Print version.
33
33
optional --version
34
- /// Print help.
35
- optional -h, --help
36
34
37
35
/// Dump a LSP config JSON schema.
38
36
optional --print-config-schema
@@ -54,10 +52,10 @@ xflags::xflags! {
54
52
}
55
53
56
54
/// Batch typecheck project and print summary statistics
57
- cmd analysis-stats
55
+ cmd analysis-stats {
58
56
/// Directory with Cargo.toml.
59
57
required path: PathBuf
60
- {
58
+
61
59
optional --output format: OutputFormat
62
60
63
61
/// Randomize order in which crates, modules, and items are processed.
@@ -84,38 +82,37 @@ xflags::xflags! {
84
82
optional --skip-inference
85
83
}
86
84
87
- cmd diagnostics
85
+ cmd diagnostics {
88
86
/// Directory with Cargo.toml.
89
87
required path: PathBuf
90
- {
88
+
91
89
/// Don't run build scripts or load `OUT_DIR` values by running `cargo check` before analysis.
92
90
optional --disable-build-scripts
93
91
/// Don't use expand proc macros.
94
92
optional --disable-proc-macros
95
93
}
96
94
97
- cmd ssr
95
+ cmd ssr {
98
96
/// A structured search replace rule (`$a.foo($b) ==> bar($a, $b)`)
99
97
repeated rule: SsrRule
100
- { }
98
+ }
101
99
102
- cmd search
100
+ cmd search {
103
101
/// A structured search replace pattern (`$a.foo($b)`)
104
102
repeated pattern: SsrPattern
105
- {
106
103
/// Prints debug information for any nodes with source exactly equal to snippet.
107
104
optional --debug snippet: String
108
105
}
109
106
110
107
cmd proc-macro { }
111
108
112
- cmd lsif
109
+ cmd lsif {
113
110
required path: PathBuf
114
- { }
111
+ }
115
112
116
- cmd scip
113
+ cmd scip {
117
114
required path: PathBuf
118
- { }
115
+ }
119
116
}
120
117
}
121
118
@@ -150,7 +147,6 @@ pub enum RustAnalyzerCmd {
150
147
#[ derive( Debug ) ]
151
148
pub struct LspServer {
152
149
pub version : bool ,
153
- pub help : bool ,
154
150
pub print_config_schema : bool ,
155
151
}
156
152
@@ -218,7 +214,10 @@ pub struct Scip {
218
214
}
219
215
220
216
impl 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
+ }
222
221
223
222
#[ allow( dead_code) ]
224
223
pub fn from_env ( ) -> xflags:: Result < Self > {
0 commit comments