about summary refs log tree commit diff
path: root/src/bootstrap/lib.rs
diff options
context:
space:
mode:
authorCollins Abitekaniza <collins.abitekaniza@osmosisworld.com>2018-05-28 02:56:33 +0300
committerCollins Abitekaniza <collins.abitekaniza@osmosisworld.com>2018-06-03 17:43:11 +0300
commit36eafe5712b9e64498716caa02649972117ee86a (patch)
treeabc9ccf830eb4af6ae02d1e7204d440d3a8e1302 /src/bootstrap/lib.rs
parent11333972e89ca6b7ada92162b8b079217caf4177 (diff)
downloadrust-36eafe5712b9e64498716caa02649972117ee86a.tar.gz
rust-36eafe5712b9e64498716caa02649972117ee86a.zip
impl is_tool on Mode enum
make is_tool inherent prop of mode

fix errors from rebase

resolve issues from review
Diffstat (limited to 'src/bootstrap/lib.rs')
-rw-r--r--src/bootstrap/lib.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs
index 7576505e295..d16d7a52065 100644
--- a/src/bootstrap/lib.rs
+++ b/src/bootstrap/lib.rs
@@ -324,6 +324,15 @@ pub enum Mode {
     ToolRustc,
 }
 
+impl Mode {
+    pub fn is_tool(&self) -> bool {
+        match self {
+            Mode::ToolStd | Mode::ToolTest | Mode::ToolRustc => true,
+            _ => false
+        }
+    }
+}
+
 impl Build {
     /// Creates a new set of build configuration from the `flags` on the command
     /// line and the filesystem `config`.