@@ -41,72 +41,72 @@ pub struct Flags {
41
41
#[ command( subcommand) ]
42
42
pub cmd : Subcommand ,
43
43
44
- #[ arg( global( true ) , short, long, action = clap:: ArgAction :: Count ) ]
44
+ #[ arg( global = true , short, long, action = clap:: ArgAction :: Count ) ]
45
45
/// use verbose output (-vv for very verbose)
46
46
pub verbose : u8 , // each extra -v after the first is passed to Cargo
47
- #[ arg( global( true ) , short, long) ]
47
+ #[ arg( global = true , short, long) ]
48
48
/// use incremental compilation
49
49
pub incremental : bool ,
50
- #[ arg( global( true ) , long, value_hint = clap:: ValueHint :: FilePath , value_name = "FILE" ) ]
50
+ #[ arg( global = true , long, value_hint = clap:: ValueHint :: FilePath , value_name = "FILE" ) ]
51
51
/// TOML configuration file for build
52
52
pub config : Option < PathBuf > ,
53
- #[ arg( global( true ) , long, value_hint = clap:: ValueHint :: DirPath , value_name = "DIR" ) ]
53
+ #[ arg( global = true , long, value_hint = clap:: ValueHint :: DirPath , value_name = "DIR" ) ]
54
54
/// Build directory, overrides `build.build-dir` in `config.toml`
55
55
pub build_dir : Option < PathBuf > ,
56
56
57
- #[ arg( global( true ) , long, value_hint = clap:: ValueHint :: Other , value_name = "BUILD" ) ]
57
+ #[ arg( global = true , long, value_hint = clap:: ValueHint :: Other , value_name = "BUILD" ) ]
58
58
/// build target of the stage0 compiler
59
59
pub build : Option < String > ,
60
60
61
- #[ arg( global( true ) , long, value_hint = clap:: ValueHint :: Other , value_name = "HOST" , value_parser = target_selection_list) ]
61
+ #[ arg( global = true , long, value_hint = clap:: ValueHint :: Other , value_name = "HOST" , value_parser = target_selection_list) ]
62
62
/// host targets to build
63
63
pub host : Option < TargetSelectionList > ,
64
64
65
- #[ arg( global( true ) , long, value_hint = clap:: ValueHint :: Other , value_name = "TARGET" , value_parser = target_selection_list) ]
65
+ #[ arg( global = true , long, value_hint = clap:: ValueHint :: Other , value_name = "TARGET" , value_parser = target_selection_list) ]
66
66
/// target targets to build
67
67
pub target : Option < TargetSelectionList > ,
68
68
69
- #[ arg( global( true ) , long, value_name = "PATH" ) ]
69
+ #[ arg( global = true , long, value_name = "PATH" ) ]
70
70
/// build paths to exclude
71
71
pub exclude : Vec < PathBuf > , // keeping for client backward compatibility
72
- #[ arg( global( true ) , long, value_name = "PATH" ) ]
72
+ #[ arg( global = true , long, value_name = "PATH" ) ]
73
73
/// build paths to skip
74
74
pub skip : Vec < PathBuf > ,
75
- #[ arg( global( true ) , long) ]
75
+ #[ arg( global = true , long) ]
76
76
/// include default paths in addition to the provided ones
77
77
pub include_default_paths : bool ,
78
78
79
- #[ arg( global( true ) , value_hint = clap:: ValueHint :: Other , long) ]
79
+ #[ arg( global = true , value_hint = clap:: ValueHint :: Other , long) ]
80
80
pub rustc_error_format : Option < String > ,
81
81
82
- #[ arg( global( true ) , long, value_hint = clap:: ValueHint :: CommandString , value_name = "CMD" ) ]
82
+ #[ arg( global = true , long, value_hint = clap:: ValueHint :: CommandString , value_name = "CMD" ) ]
83
83
/// command to run on failure
84
84
pub on_fail : Option < String > ,
85
- #[ arg( global( true ) , long) ]
85
+ #[ arg( global = true , long) ]
86
86
/// dry run; don't build anything
87
87
pub dry_run : bool ,
88
88
/// Indicates whether to dump the work done from bootstrap shims
89
- #[ arg( global( true ) , long) ]
89
+ #[ arg( global = true , long) ]
90
90
pub dump_bootstrap_shims : bool ,
91
- #[ arg( global( true ) , value_hint = clap:: ValueHint :: Other , long, value_name = "N" ) ]
91
+ #[ arg( global = true , value_hint = clap:: ValueHint :: Other , long, value_name = "N" ) ]
92
92
/// stage to build (indicates compiler to use/test, e.g., stage 0 uses the
93
93
/// bootstrap compiler, stage 1 the stage 0 rustc artifacts, etc.)
94
94
pub stage : Option < u32 > ,
95
95
96
- #[ arg( global( true ) , value_hint = clap:: ValueHint :: Other , long, value_name = "N" ) ]
96
+ #[ arg( global = true , value_hint = clap:: ValueHint :: Other , long, value_name = "N" ) ]
97
97
/// stage(s) to keep without recompiling
98
98
/// (pass multiple times to keep e.g., both stages 0 and 1)
99
99
pub keep_stage : Vec < u32 > ,
100
- #[ arg( global( true ) , value_hint = clap:: ValueHint :: Other , long, value_name = "N" ) ]
100
+ #[ arg( global = true , value_hint = clap:: ValueHint :: Other , long, value_name = "N" ) ]
101
101
/// stage(s) of the standard library to keep without recompiling
102
102
/// (pass multiple times to keep e.g., both stages 0 and 1)
103
103
pub keep_stage_std : Vec < u32 > ,
104
- #[ arg( global( true ) , long, value_hint = clap:: ValueHint :: DirPath , value_name = "DIR" ) ]
104
+ #[ arg( global = true , long, value_hint = clap:: ValueHint :: DirPath , value_name = "DIR" ) ]
105
105
/// path to the root of the rust checkout
106
106
pub src : Option < PathBuf > ,
107
107
108
108
#[ arg(
109
- global( true ) ,
109
+ global = true ,
110
110
short,
111
111
long,
112
112
value_hint = clap:: ValueHint :: Other ,
@@ -117,68 +117,68 @@ pub struct Flags {
117
117
pub jobs : usize ,
118
118
// This overrides the deny-warnings configuration option,
119
119
// which passes -Dwarnings to the compiler invocations.
120
- #[ arg( global( true ) , long) ]
120
+ #[ arg( global = true , long) ]
121
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
125
125
pub warnings : Warnings ,
126
126
127
- #[ arg( global( true ) , value_hint = clap:: ValueHint :: Other , long, value_name = "FORMAT" ) ]
127
+ #[ arg( global = true , value_hint = clap:: ValueHint :: Other , long, value_name = "FORMAT" ) ]
128
128
/// rustc error format
129
129
pub error_format : Option < String > ,
130
- #[ arg( global( true ) , long) ]
130
+ #[ arg( global = true , long) ]
131
131
/// use message-format=json
132
132
pub json_output : bool ,
133
133
134
- #[ arg( global( true ) , long, value_name = "STYLE" ) ]
134
+ #[ arg( global = true , long, value_name = "STYLE" ) ]
135
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
139
- #[ arg( global( true ) , long) ]
139
+ #[ arg( global = true , long) ]
140
140
/// Bootstrap uses this value to decide whether it should bypass locking the build process.
141
141
/// This is rarely needed (e.g., compiling the std library for different targets in parallel).
142
142
///
143
143
/// Unless you know exactly what you are doing, you probably don't need this.
144
144
pub bypass_bootstrap_lock : bool ,
145
145
146
146
/// whether rebuilding llvm should be skipped, overriding `skip-rebuld` in config.toml
147
- #[ arg( global( true ) , long, value_name = "VALUE" ) ]
147
+ #[ arg( global = true , long, value_name = "VALUE" ) ]
148
148
pub llvm_skip_rebuild : Option < bool > ,
149
149
/// generate PGO profile with rustc build
150
- #[ arg( global( true ) , value_hint = clap:: ValueHint :: FilePath , long, value_name = "PROFILE" ) ]
150
+ #[ arg( global = true , value_hint = clap:: ValueHint :: FilePath , long, value_name = "PROFILE" ) ]
151
151
pub rust_profile_generate : Option < String > ,
152
152
/// use PGO profile for rustc build
153
- #[ arg( global( true ) , value_hint = clap:: ValueHint :: FilePath , long, value_name = "PROFILE" ) ]
153
+ #[ arg( global = true , value_hint = clap:: ValueHint :: FilePath , long, value_name = "PROFILE" ) ]
154
154
pub rust_profile_use : Option < String > ,
155
155
/// use PGO profile for LLVM build
156
- #[ arg( global( true ) , value_hint = clap:: ValueHint :: FilePath , long, value_name = "PROFILE" ) ]
156
+ #[ arg( global = true , value_hint = clap:: ValueHint :: FilePath , long, value_name = "PROFILE" ) ]
157
157
pub llvm_profile_use : Option < String > ,
158
158
// LLVM doesn't support a custom location for generating profile
159
159
// information.
160
160
//
161
161
// llvm_out/build/profiles/ is the location this writes to.
162
162
/// generate PGO profile with llvm built for rustc
163
- #[ arg( global( true ) , long) ]
163
+ #[ arg( global = true , long) ]
164
164
pub llvm_profile_generate : bool ,
165
165
/// Enable BOLT link flags
166
- #[ arg( global( true ) , long) ]
166
+ #[ arg( global = true , long) ]
167
167
pub enable_bolt_settings : bool ,
168
168
/// Skip stage0 compiler validation
169
- #[ arg( global( true ) , long) ]
169
+ #[ arg( global = true , long) ]
170
170
pub skip_stage0_validation : bool ,
171
171
/// Additional reproducible artifacts that should be added to the reproducible artifacts archive.
172
- #[ arg( global( true ) , long) ]
172
+ #[ arg( global = true , long) ]
173
173
pub reproducible_artifact : Vec < String > ,
174
- #[ arg( global( true ) ) ]
174
+ #[ arg( global = true ) ]
175
175
/// paths for the subcommand
176
176
pub paths : Vec < PathBuf > ,
177
177
/// override options in config.toml
178
- #[ arg( global( true ) , value_hint = clap:: ValueHint :: Other , long, value_name = "section.option=value" ) ]
178
+ #[ arg( global = true , value_hint = clap:: ValueHint :: Other , long, value_name = "section.option=value" ) ]
179
179
pub set : Vec < String > ,
180
180
/// arguments passed to subcommands
181
- #[ arg( global( true ) , last( true ) , value_name = "ARGS" ) ]
181
+ #[ arg( global = true , last( true ) , value_name = "ARGS" ) ]
182
182
pub free_args : Vec < String > ,
183
183
}
184
184
@@ -192,7 +192,7 @@ impl Flags {
192
192
struct HelpVerboseOnly {
193
193
#[ arg( short, long) ]
194
194
help : bool ,
195
- #[ arg( global( true ) , short, long, action = clap:: ArgAction :: Count ) ]
195
+ #[ arg( global = true , short, long, action = clap:: ArgAction :: Count ) ]
196
196
pub verbose : u8 ,
197
197
#[ arg( value_enum) ]
198
198
cmd : Kind ,
@@ -260,16 +260,16 @@ pub enum Subcommand {
260
260
#[ arg( long, requires = "fix" ) ]
261
261
allow_staged : bool ,
262
262
/// clippy lints to allow
263
- #[ arg( global( true ) , short = 'A' , action = clap:: ArgAction :: Append , value_name = "LINT" ) ]
263
+ #[ arg( global = true , short = 'A' , action = clap:: ArgAction :: Append , value_name = "LINT" ) ]
264
264
allow : Vec < String > ,
265
265
/// clippy lints to deny
266
- #[ arg( global( true ) , short = 'D' , action = clap:: ArgAction :: Append , value_name = "LINT" ) ]
266
+ #[ arg( global = true , short = 'D' , action = clap:: ArgAction :: Append , value_name = "LINT" ) ]
267
267
deny : Vec < String > ,
268
268
/// clippy lints to warn on
269
- #[ arg( global( true ) , short = 'W' , action = clap:: ArgAction :: Append , value_name = "LINT" ) ]
269
+ #[ arg( global = true , short = 'W' , action = clap:: ArgAction :: Append , value_name = "LINT" ) ]
270
270
warn : Vec < String > ,
271
271
/// clippy lints to forbid
272
- #[ arg( global( true ) , short = 'F' , action = clap:: ArgAction :: Append , value_name = "LINT" ) ]
272
+ #[ arg( global = true , short = 'F' , action = clap:: ArgAction :: Append , value_name = "LINT" ) ]
273
273
forbid : Vec < String > ,
274
274
} ,
275
275
/// Run cargo fix
0 commit comments