about summary refs log tree commit diff
path: root/src/bootstrap
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2022-03-04 17:31:07 +0100
committerGitHub <noreply@github.com>2022-03-04 17:31:07 +0100
commit4014e159c902f2ceba9274b8d2c0d83a899b989b (patch)
tree1dfe51d84e7911e3bc862e889354d040386e79c6 /src/bootstrap
parentee3a2c7a8c13004f599ee27c1671713292a33cc5 (diff)
parente8f790fec7eda5ca722c38ca6b2ebf84399a0165 (diff)
downloadrust-4014e159c902f2ceba9274b8d2c0d83a899b989b.tar.gz
rust-4014e159c902f2ceba9274b8d2c0d83a899b989b.zip
Rollup merge of #94568 - bjorn3:rustbuild_remove_dead_code, r=Mark-Simulacrum
Remove some dead code from rustbuild

This should reduce build time a tiny bit.
Diffstat (limited to 'src/bootstrap')
-rw-r--r--src/bootstrap/config.rs12
-rw-r--r--src/bootstrap/toolstate.rs13
2 files changed, 8 insertions, 17 deletions
diff --git a/src/bootstrap/config.rs b/src/bootstrap/config.rs
index ce76ccd5755..997e811e214 100644
--- a/src/bootstrap/config.rs
+++ b/src/bootstrap/config.rs
@@ -387,7 +387,7 @@ macro_rules! derive_merge {
 
 derive_merge! {
     /// TOML representation of various global build decisions.
-    #[derive(Deserialize, Default, Clone)]
+    #[derive(Deserialize, Default)]
     #[serde(deny_unknown_fields, rename_all = "kebab-case")]
     struct Build {
         build: Option<String>,
@@ -434,7 +434,7 @@ derive_merge! {
 
 derive_merge! {
     /// TOML representation of various global install decisions.
-    #[derive(Deserialize, Default, Clone)]
+    #[derive(Deserialize)]
     #[serde(deny_unknown_fields, rename_all = "kebab-case")]
     struct Install {
         prefix: Option<String>,
@@ -449,7 +449,7 @@ derive_merge! {
 
 derive_merge! {
     /// TOML representation of how the LLVM build is configured.
-    #[derive(Deserialize, Default)]
+    #[derive(Deserialize)]
     #[serde(deny_unknown_fields, rename_all = "kebab-case")]
     struct Llvm {
         skip_rebuild: Option<bool>,
@@ -483,7 +483,7 @@ derive_merge! {
 }
 
 derive_merge! {
-    #[derive(Deserialize, Default, Clone)]
+    #[derive(Deserialize)]
     #[serde(deny_unknown_fields, rename_all = "kebab-case")]
     struct Dist {
         sign_folder: Option<String>,
@@ -510,7 +510,7 @@ impl Default for StringOrBool {
 
 derive_merge! {
     /// TOML representation of how the Rust build is configured.
-    #[derive(Deserialize, Default)]
+    #[derive(Deserialize)]
     #[serde(deny_unknown_fields, rename_all = "kebab-case")]
     struct Rust {
         optimize: Option<bool>,
@@ -565,7 +565,7 @@ derive_merge! {
 
 derive_merge! {
     /// TOML representation of how each build target is configured.
-    #[derive(Deserialize, Default)]
+    #[derive(Deserialize)]
     #[serde(deny_unknown_fields, rename_all = "kebab-case")]
     struct TomlTarget {
         cc: Option<String>,
diff --git a/src/bootstrap/toolstate.rs b/src/bootstrap/toolstate.rs
index 2394c5e020d..08d08158062 100644
--- a/src/bootstrap/toolstate.rs
+++ b/src/bootstrap/toolstate.rs
@@ -24,7 +24,7 @@ const OS: Option<&str> = None;
 
 type ToolstateData = HashMap<Box<str>, ToolState>;
 
-#[derive(Copy, Clone, Debug, Deserialize, Serialize, PartialEq, Eq, PartialOrd)]
+#[derive(Copy, Clone, Debug, Deserialize, Serialize, PartialEq, PartialOrd)]
 #[serde(rename_all = "kebab-case")]
 /// Whether a tool can be compiled, tested or neither
 pub enum ToolState {
@@ -50,13 +50,6 @@ impl fmt::Display for ToolState {
     }
 }
 
-impl Default for ToolState {
-    fn default() -> Self {
-        // err on the safe side
-        ToolState::BuildFail
-    }
-}
-
 /// Number of days after the last promotion of beta.
 /// Its value is 41 on the Tuesday where "Promote master to beta (T-2)" happens.
 /// The Wednesday after this has value 0.
@@ -466,13 +459,11 @@ fn publish_test_results(current_toolstate: &ToolstateData) {
     t!(fs::write(&history_path, file));
 }
 
-#[derive(Debug, Serialize, Deserialize)]
+#[derive(Debug, Deserialize)]
 struct RepoState {
     tool: String,
     windows: ToolState,
     linux: ToolState,
-    commit: String,
-    datetime: String,
 }
 
 impl RepoState {