@@ -31,7 +31,7 @@ pub enum Warnings {
31
31
32
32
/// Deserialized version of all flags for this compile.
33
33
#[ derive( Debug , Parser ) ]
34
- #[ clap (
34
+ #[ command (
35
35
override_usage = "x.py <subcommand> [options] [<paths>...]" ,
36
36
disable_help_subcommand( true ) ,
37
37
about = "" ,
@@ -118,7 +118,7 @@ pub struct Flags {
118
118
// This overrides the deny-warnings configuration option,
119
119
// which passes -Dwarnings to the compiler invocations.
120
120
#[ arg( global( true ) , long) ]
121
- #[ clap ( value_enum, default_value_t=Warnings :: Default , value_name = "deny|warn" ) ]
121
+ #[ arg ( value_enum, default_value_t=Warnings :: Default , value_name = "deny|warn" ) ]
122
122
/// if value is deny, will deny warnings
123
123
/// if value is warn, will emit warnings
124
124
/// otherwise, use the default configured behaviour
@@ -132,7 +132,7 @@ pub struct Flags {
132
132
pub json_output : bool ,
133
133
134
134
#[ arg( global( true ) , long, value_name = "STYLE" ) ]
135
- #[ clap ( value_enum, default_value_t = Color :: Auto ) ]
135
+ #[ arg ( value_enum, default_value_t = Color :: Auto ) ]
136
136
/// whether to use color in cargo and rustc output
137
137
pub color : Color ,
138
138
@@ -188,7 +188,7 @@ impl Flags {
188
188
let it = std:: iter:: once ( & first) . chain ( args. iter ( ) ) ;
189
189
// We need to check for `<cmd> -h -v`, in which case we list the paths
190
190
#[ derive( Parser ) ]
191
- #[ clap ( disable_help_flag( true ) ) ]
191
+ #[ command ( disable_help_flag( true ) ) ]
192
192
struct HelpVerboseOnly {
193
193
#[ arg( short, long) ]
194
194
help : bool ,
@@ -218,7 +218,7 @@ impl Flags {
218
218
219
219
#[ derive( Debug , Clone , Default , clap:: Subcommand ) ]
220
220
pub enum Subcommand {
221
- #[ clap ( aliases = [ "b" ] , long_about = "\n
221
+ #[ command ( aliases = [ "b" ] , long_about = "\n
222
222
Arguments:
223
223
This subcommand accepts a number of paths to directories to the crates
224
224
and/or artifacts to compile. For example, for a quick build of a usable
@@ -233,7 +233,7 @@ pub enum Subcommand {
233
233
/// Compile either the compiler or libraries
234
234
#[ default]
235
235
Build ,
236
- #[ clap ( aliases = [ "c" ] , long_about = "\n
236
+ #[ command ( aliases = [ "c" ] , long_about = "\n
237
237
Arguments:
238
238
This subcommand accepts a number of paths to directories to the crates
239
239
and/or artifacts to compile. For example:
@@ -246,7 +246,7 @@ pub enum Subcommand {
246
246
all_targets : bool ,
247
247
} ,
248
248
/// Run Clippy (uses rustup/cargo-installed clippy binary)
249
- #[ clap ( long_about = "\n
249
+ #[ command ( long_about = "\n
250
250
Arguments:
251
251
This subcommand accepts a number of paths to directories to the crates
252
252
and/or artifacts to run clippy against. For example:
@@ -273,14 +273,14 @@ pub enum Subcommand {
273
273
forbid : Vec < String > ,
274
274
} ,
275
275
/// Run cargo fix
276
- #[ clap ( long_about = "\n
276
+ #[ command ( long_about = "\n
277
277
Arguments:
278
278
This subcommand accepts a number of paths to directories to the crates
279
279
and/or artifacts to run `cargo fix` against. For example:
280
280
./x.py fix library/core
281
281
./x.py fix library/core library/proc_macro" ) ]
282
282
Fix ,
283
- #[ clap (
283
+ #[ command (
284
284
name = "fmt" ,
285
285
long_about = "\n
286
286
Arguments:
@@ -295,7 +295,7 @@ pub enum Subcommand {
295
295
#[ arg( long) ]
296
296
check : bool ,
297
297
} ,
298
- #[ clap ( aliases = [ "d" ] , long_about = "\n
298
+ #[ command ( aliases = [ "d" ] , long_about = "\n
299
299
Arguments:
300
300
This subcommand accepts a number of paths to directories of documentation
301
301
to build. For example:
@@ -316,7 +316,7 @@ pub enum Subcommand {
316
316
/// render the documentation in JSON format in addition to the usual HTML format
317
317
json : bool ,
318
318
} ,
319
- #[ clap ( aliases = [ "t" ] , long_about = "\n
319
+ #[ command ( aliases = [ "t" ] , long_about = "\n
320
320
Arguments:
321
321
This subcommand accepts a number of paths to test directories that
322
322
should be compiled and run. For example:
@@ -400,7 +400,7 @@ pub enum Subcommand {
400
400
Dist ,
401
401
/// Install distribution artifacts
402
402
Install ,
403
- #[ clap ( aliases = [ "r" ] , long_about = "\n
403
+ #[ command ( aliases = [ "r" ] , long_about = "\n
404
404
Arguments:
405
405
This subcommand accepts a number of paths to tools to build and run. For
406
406
example:
@@ -413,7 +413,7 @@ pub enum Subcommand {
413
413
args : Vec < String > ,
414
414
} ,
415
415
/// Set up the environment for development
416
- #[ clap ( long_about = format!(
416
+ #[ command ( long_about = format!(
417
417
"\n
418
418
x.py setup creates a `config.toml` which changes the defaults for x.py itself,
419
419
as well as setting up a git pre-push hook, VS Code config and toolchain link.
@@ -434,7 +434,7 @@ Arguments:
434
434
profile : Option < PathBuf > ,
435
435
} ,
436
436
/// Suggest a subset of tests to run, based on modified files
437
- #[ clap ( long_about = "\n " ) ]
437
+ #[ command ( long_about = "\n " ) ]
438
438
Suggest {
439
439
/// run suggested tests
440
440
#[ arg( long) ]
0 commit comments