@@ -56,8 +56,7 @@ pub enum DryRun {
5656/// filled out from the decoded forms of the structs below. For documentation
5757/// each field, see the corresponding fields in
5858/// `config.example.toml`.
59- #[ derive( Default ) ]
60- #[ cfg_attr( test, derive( Clone ) ) ]
59+ #[ derive( Default , Clone ) ]
6160pub struct Config {
6261 pub changelog_seen : Option < usize > ,
6362 pub ccache : Option < String > ,
@@ -240,32 +239,28 @@ pub struct Config {
240239 pub initial_rustfmt : RefCell < RustfmtState > ,
241240}
242241
243- #[ derive( Default , Deserialize ) ]
244- #[ cfg_attr( test, derive( Clone ) ) ]
242+ #[ derive( Default , Deserialize , Clone ) ]
245243pub struct Stage0Metadata {
246244 pub compiler : CompilerMetadata ,
247245 pub config : Stage0Config ,
248246 pub checksums_sha256 : HashMap < String , String > ,
249247 pub rustfmt : Option < RustfmtMetadata > ,
250248}
251- #[ derive( Default , Deserialize ) ]
252- #[ cfg_attr( test, derive( Clone ) ) ]
249+ #[ derive( Default , Deserialize , Clone ) ]
253250pub struct CompilerMetadata {
254251 pub date : String ,
255252 pub version : String ,
256253}
257254
258- #[ derive( Default , Deserialize ) ]
259- #[ cfg_attr( test, derive( Clone ) ) ]
255+ #[ derive( Default , Deserialize , Clone ) ]
260256pub struct Stage0Config {
261257 pub dist_server : String ,
262258 pub artifacts_server : String ,
263259 pub artifacts_with_llvm_assertions_server : String ,
264260 pub git_merge_commit_email : String ,
265261 pub nightly_branch : String ,
266262}
267- #[ derive( Default , Deserialize ) ]
268- #[ cfg_attr( test, derive( Clone ) ) ]
263+ #[ derive( Default , Deserialize , Clone ) ]
269264pub struct RustfmtMetadata {
270265 pub date : String ,
271266 pub version : String ,
@@ -443,8 +438,7 @@ impl PartialEq<&str> for TargetSelection {
443438}
444439
445440/// Per-target configuration stored in the global configuration structure.
446- #[ derive( Default ) ]
447- #[ cfg_attr( test, derive( Clone ) ) ]
441+ #[ derive( Default , Clone ) ]
448442pub struct Target {
449443 /// Some(path to llvm-config) if using an external LLVM.
450444 pub llvm_config : Option < PathBuf > ,
@@ -1396,7 +1390,8 @@ impl Config {
13961390 | Subcommand :: Fix { .. }
13971391 | Subcommand :: Run { .. }
13981392 | Subcommand :: Setup { .. }
1399- | Subcommand :: Format { .. } => flags. stage . unwrap_or ( 0 ) ,
1393+ | Subcommand :: Format { .. }
1394+ | Subcommand :: Suggest { .. } => flags. stage . unwrap_or ( 0 ) ,
14001395 } ;
14011396
14021397 // CI should always run stage 2 builds, unless it specifically states otherwise
@@ -1421,7 +1416,8 @@ impl Config {
14211416 | Subcommand :: Fix { .. }
14221417 | Subcommand :: Run { .. }
14231418 | Subcommand :: Setup { .. }
1424- | Subcommand :: Format { .. } => { }
1419+ | Subcommand :: Format { .. }
1420+ | Subcommand :: Suggest { .. } => { }
14251421 }
14261422 }
14271423
0 commit comments