]> git.lizzy.rs Git - rust.git/blob - src/bootstrap/toolstate.rs
Rollup merge of #60766 - vorner:weak-into-raw, r=sfackler
[rust.git] / src / bootstrap / toolstate.rs
1 use serde::{Deserialize, Serialize};
2
3 #[derive(Copy, Clone, Debug, Deserialize, Serialize, PartialEq, Eq)]
4 #[serde(rename_all = "kebab-case")]
5 /// Whether a tool can be compiled, tested or neither
6 pub enum ToolState {
7     /// The tool compiles successfully, but the test suite fails
8     TestFail = 1,
9     /// The tool compiles successfully and its test suite passes
10     TestPass = 2,
11     /// The tool can't even be compiled
12     BuildFail = 0,
13 }
14
15 impl Default for ToolState {
16     fn default() -> Self {
17         // err on the safe side
18         ToolState::BuildFail
19     }
20 }