diff options
Diffstat (limited to 'user/rust/0009-compiletest-Match-suffixed-environments.patch')
-rw-r--r-- | user/rust/0009-compiletest-Match-suffixed-environments.patch | 48 |
1 files changed, 0 insertions, 48 deletions
diff --git a/user/rust/0009-compiletest-Match-suffixed-environments.patch b/user/rust/0009-compiletest-Match-suffixed-environments.patch deleted file mode 100644 index 0fa811d5a..000000000 --- a/user/rust/0009-compiletest-Match-suffixed-environments.patch +++ /dev/null @@ -1,48 +0,0 @@ -From 12593754aebecd852a8738524025fa59cf44c429 Mon Sep 17 00:00:00 2001 -From: Samuel Holland <samuel@sholland.org> -Date: Mon, 2 Sep 2019 22:10:10 -0500 -Subject: [PATCH 09/18] compiletest: Match suffixed environments - ---- - src/tools/compiletest/src/header.rs | 2 +- - src/tools/compiletest/src/util.rs | 8 ++++++-- - 2 files changed, 7 insertions(+), 3 deletions(-) - -diff --git a/src/tools/compiletest/src/header.rs b/src/tools/compiletest/src/header.rs -index 076ad87c70f..c5141e97a4e 100644 ---- a/src/tools/compiletest/src/header.rs -+++ b/src/tools/compiletest/src/header.rs -@@ -819,10 +819,10 @@ impl Config { - - if name == "test" || - util::matches_os(&self.target, name) || // target -+ util::matches_env(&self.target, name) || // env - name == util::get_arch(&self.target) || // architecture - name == util::get_pointer_width(&self.target) || // pointer width - name == self.stage_id.split('-').next().unwrap() || // stage -- Some(name) == util::get_env(&self.target) || // env - (self.target != self.host && name == "cross-compile") || - match self.compare_mode { - Some(CompareMode::Nll) => name == "compare-mode-nll", -diff --git a/src/tools/compiletest/src/util.rs b/src/tools/compiletest/src/util.rs -index 56ebea7c20f..3a2ee445087 100644 ---- a/src/tools/compiletest/src/util.rs -+++ b/src/tools/compiletest/src/util.rs -@@ -105,8 +105,12 @@ pub fn get_arch(triple: &str) -> &'static str { - panic!("Cannot determine Architecture from triple"); - } - --pub fn get_env(triple: &str) -> Option<&str> { -- triple.split('-').nth(3) -+pub fn matches_env(triple: &str, name: &str) -> bool { -+ if let Some(env) = triple.split('-').nth(3) { -+ env.starts_with(name) -+ } else { -+ false -+ } - } - - pub fn get_pointer_width(triple: &str) -> &'static str { --- -2.21.0 - |