@@ -56,8 +56,7 @@ pub enum DryRun {
56
56
/// filled out from the decoded forms of the structs below. For documentation
57
57
/// each field, see the corresponding fields in
58
58
/// `config.example.toml`.
59
- #[ derive( Default ) ]
60
- #[ cfg_attr( test, derive( Clone ) ) ]
59
+ #[ derive( Default , Clone ) ]
61
60
pub struct Config {
62
61
pub changelog_seen : Option < usize > ,
63
62
pub ccache : Option < String > ,
@@ -240,32 +239,28 @@ pub struct Config {
240
239
pub initial_rustfmt : RefCell < RustfmtState > ,
241
240
}
242
241
243
- #[ derive( Default , Deserialize ) ]
244
- #[ cfg_attr( test, derive( Clone ) ) ]
242
+ #[ derive( Default , Deserialize , Clone ) ]
245
243
pub struct Stage0Metadata {
246
244
pub compiler : CompilerMetadata ,
247
245
pub config : Stage0Config ,
248
246
pub checksums_sha256 : HashMap < String , String > ,
249
247
pub rustfmt : Option < RustfmtMetadata > ,
250
248
}
251
- #[ derive( Default , Deserialize ) ]
252
- #[ cfg_attr( test, derive( Clone ) ) ]
249
+ #[ derive( Default , Deserialize , Clone ) ]
253
250
pub struct CompilerMetadata {
254
251
pub date : String ,
255
252
pub version : String ,
256
253
}
257
254
258
- #[ derive( Default , Deserialize ) ]
259
- #[ cfg_attr( test, derive( Clone ) ) ]
255
+ #[ derive( Default , Deserialize , Clone ) ]
260
256
pub struct Stage0Config {
261
257
pub dist_server : String ,
262
258
pub artifacts_server : String ,
263
259
pub artifacts_with_llvm_assertions_server : String ,
264
260
pub git_merge_commit_email : String ,
265
261
pub nightly_branch : String ,
266
262
}
267
- #[ derive( Default , Deserialize ) ]
268
- #[ cfg_attr( test, derive( Clone ) ) ]
263
+ #[ derive( Default , Deserialize , Clone ) ]
269
264
pub struct RustfmtMetadata {
270
265
pub date : String ,
271
266
pub version : String ,
@@ -443,8 +438,7 @@ impl PartialEq<&str> for TargetSelection {
443
438
}
444
439
445
440
/// Per-target configuration stored in the global configuration structure.
446
- #[ derive( Default ) ]
447
- #[ cfg_attr( test, derive( Clone ) ) ]
441
+ #[ derive( Default , Clone ) ]
448
442
pub struct Target {
449
443
/// Some(path to llvm-config) if using an external LLVM.
450
444
pub llvm_config : Option < PathBuf > ,
@@ -1396,7 +1390,8 @@ impl Config {
1396
1390
| Subcommand :: Fix { .. }
1397
1391
| Subcommand :: Run { .. }
1398
1392
| Subcommand :: Setup { .. }
1399
- | Subcommand :: Format { .. } => flags. stage . unwrap_or ( 0 ) ,
1393
+ | Subcommand :: Format { .. }
1394
+ | Subcommand :: Suggest { .. } => flags. stage . unwrap_or ( 0 ) ,
1400
1395
} ;
1401
1396
1402
1397
// CI should always run stage 2 builds, unless it specifically states otherwise
@@ -1421,7 +1416,8 @@ impl Config {
1421
1416
| Subcommand :: Fix { .. }
1422
1417
| Subcommand :: Run { .. }
1423
1418
| Subcommand :: Setup { .. }
1424
- | Subcommand :: Format { .. } => { }
1419
+ | Subcommand :: Format { .. }
1420
+ | Subcommand :: Suggest { .. } => { }
1425
1421
}
1426
1422
}
1427
1423
0 commit comments