From d63b1695f0a16e3cafc94e30e5c23db851c547ee Mon Sep 17 00:00:00 2001 From: Julian Wollersberger <24991778+Julian-Wollersberger@users.noreply.github.com> Date: Thu, 5 Dec 2019 22:03:35 +0100 Subject: [PATCH 1/3] Add ICE #67019 It's a bit hacky because the ICE from rust-lang/rust#67019 needs compiler flags and I don't know of a way to provide that from within a .rs file. --- ices/67019.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 ices/67019.sh diff --git a/ices/67019.sh b/ices/67019.sh new file mode 100644 index 00000000..d6222cc3 --- /dev/null +++ b/ices/67019.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +mkdir temp +cd temp +cat > temp.rs << EOF + +fn test(this: ((u8, u8),)) { + assert!((this.0).1 == 0); +} +fn main() { + test(((1, 2),)); +} + +EOF + +rustc --edition 2018 temp.rs -Z mir-opt-level=2 From e36cfd90d555fa52a27407ce2076d5e089accea5 Mon Sep 17 00:00:00 2001 From: Julian Wollersberger <24991778+Julian-Wollersberger@users.noreply.github.com> Date: Fri, 6 Dec 2019 20:51:01 +0100 Subject: [PATCH 2/3] Use - as a filename to skip the temp file creation bits, as suggested by Alexendoo --- ices/67019.sh | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/ices/67019.sh b/ices/67019.sh index d6222cc3..542bcdf2 100644 --- a/ices/67019.sh +++ b/ices/67019.sh @@ -1,9 +1,6 @@ #!/bin/bash -mkdir temp -cd temp -cat > temp.rs << EOF - +rustc --edition 2018 -Z mir-opt-level=2 - << EOF fn test(this: ((u8, u8),)) { assert!((this.0).1 == 0); } @@ -12,5 +9,3 @@ fn main() { } EOF - -rustc --edition 2018 temp.rs -Z mir-opt-level=2 From 8993b7857738795afb9cc921a91d22f9d82ec09d Mon Sep 17 00:00:00 2001 From: Julian Wollersberger <24991778+Julian-Wollersberger@users.noreply.github.com> Date: Fri, 6 Dec 2019 22:32:47 +0100 Subject: [PATCH 3/3] Fixed error on CI. It was because `67019.sh` didn't have execute rights. Glacier did run scripts as if you entered `./script.sh` in your prompt, but that requires execute rights on the script. So I changed glacier to run `bash script.sh`, which only requires read rights. Also, shouldn't glacier emit the `+nightly` flag to rustc? --- ices/67019.sh | 2 +- src/lib.rs | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) mode change 100644 => 100755 ices/67019.sh diff --git a/ices/67019.sh b/ices/67019.sh old mode 100644 new mode 100755 index 542bcdf2..9e1df75e --- a/ices/67019.sh +++ b/ices/67019.sh @@ -1,6 +1,6 @@ #!/bin/bash -rustc --edition 2018 -Z mir-opt-level=2 - << EOF +rustc +nightly --edition 2018 -Z mir-opt-level=2 - << EOF fn test(this: ((u8, u8),)) { assert!((this.0).1 == 0); } diff --git a/src/lib.rs b/src/lib.rs index 865ba4db..d36fb298 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -8,6 +8,7 @@ pub use rayon; static RUSTC: &str = "rustc"; static ICES_PATH: &str = "ices"; +static SHELL: &str = "bash"; #[derive(Debug, PartialEq, Eq, PartialOrd, Ord)] enum TestMode { @@ -40,7 +41,8 @@ impl ICE { .arg(std::fs::canonicalize(&self.path)?) .current_dir(workdir.path()) .output()?, - TestMode::ShellScript => Command::new(std::fs::canonicalize(&self.path)?) + TestMode::ShellScript => Command::new(SHELL) + .arg(std::fs::canonicalize(&self.path)?) .current_dir(workdir.path()) .output()?, };