Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove some dead code from rustbuild #94568

Merged
merged 2 commits into from
Mar 4, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions src/bootstrap/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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>,
Expand Down Expand Up @@ -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>,
Expand All @@ -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>,
Expand Down Expand Up @@ -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>,
Expand All @@ -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>,
Expand Down Expand Up @@ -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>,
Expand Down
13 changes: 2 additions & 11 deletions src/bootstrap/toolstate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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.
Expand Down Expand Up @@ -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 {
Expand Down