diff --git a/build.rs b/build.rs index ca7b63672919501d4d5f65844502649a4aa584d2..525c59490cfe3f1110a7949644b0d0943bf9649b 100644 --- a/build.rs +++ b/build.rs @@ -5,9 +5,10 @@ extern crate version_check; use ansi_term::Color::{Red, Yellow, Blue, White}; use version_check::is_min_version; -// Specifies the minimum stable version needed to compile Ion. -// NOTE: 1.18 is required due to the usage of `Child::try_wait()`. -const MIN_VERSION: &'static str = "1.18.0"; +// Specifies the minimum version needed to compile Ion. +// NOTE: 1.19 is required due to the usage of `break` with values for +// `loop` (RFC 1624, rust-lang/rust GitHub issue #37339). +const MIN_VERSION: &'static str = "1.19.0"; // Convenience macro for writing to stderr. macro_rules! printerr { @@ -32,7 +33,7 @@ fn main() { Some((_, ref version_string)) => { printerr!("{} {}", Red.bold().paint("Error:"), - White.paint("Ion requires at least version 1.17.0 to build.")); + White.paint("Ion requires at least version 1.19.0 to build.")); print_version_err(&*version_string); printerr!("{}{}{}", Blue.paint("Use `"), diff --git a/examples/run_examples.sh b/examples/run_examples.sh index c6c62b3d9fcdaf928729b131ea4feef10390800e..bfea101f10ff8036fe337017f67ecc8082e4312c 100755 --- a/examples/run_examples.sh +++ b/examples/run_examples.sh @@ -11,6 +11,10 @@ PROJECT_DIR=$(dirname $(cargo locate-project | awk -F\" '{print $4}')) EXIT_VAL=0 +# Some of the examples assume that the working directory is the project root +# and it never hurts to force consistency regardless +cd $PROJECT_DIR + function check_return_value { # Check number of parameters passed into the check function