diff --git a/codegen/Cargo.toml b/codegen/Cargo.toml index 6d5e32d8..67cdb8a4 100644 --- a/codegen/Cargo.toml +++ b/codegen/Cargo.toml @@ -16,11 +16,11 @@ plugin = true [dependencies] rocket = { version = "0.2.8", path = "../lib/" } -log = "^0.3" +log = "0.3" [dev-dependencies] -compiletest_rs = "^0.2" +compiletest_rs = "0.2" [build-dependencies] yansi = "0.2" -version_check = "0.1" +version_check = "0.1.2" diff --git a/codegen/build.rs b/codegen/build.rs index 3c7f2572..ac0deddf 100644 --- a/codegen/build.rs +++ b/codegen/build.rs @@ -5,7 +5,7 @@ extern crate yansi; extern crate version_check; use yansi::Color::{Red, Yellow, Blue, White}; -use version_check::{is_nightly, is_min_version, is_min_date}; +use version_check::{supports_features, is_min_version, is_min_date}; // Specifies the minimum nightly version needed to compile Rocket's codegen. const MIN_DATE: &'static str = "2017-06-01"; @@ -21,7 +21,7 @@ macro_rules! printerr { } fn main() { - let ok_nightly = is_nightly(); + let ok_channel = supports_features(); let ok_version = is_min_version(MIN_VERSION); let ok_date = is_min_date(MIN_DATE); @@ -33,12 +33,12 @@ fn main() { Yellow.paint(format!("{} ({})", MIN_VERSION, MIN_DATE))); }; - match (ok_nightly, ok_version, ok_date) { - (Some(is_nightly), Some((ok_version, version)), Some((ok_date, date))) => { - if !is_nightly { + match (ok_channel, ok_version, ok_date) { + (Some(ok_channel), Some((ok_version, version)), Some((ok_date, date))) => { + if !ok_channel { printerr!("{} {}", Red.paint("Error:").bold(), - White.paint("Rocket requires a nightly version of Rust.")); + White.paint("Rocket requires a nightly or dev version of Rust.")); print_version_err(&*version, &*date); printerr!("{}{}{}", Blue.paint("See the getting started guide ("), diff --git a/lib/Cargo.toml b/lib/Cargo.toml index 9c7b4226..dcffce68 100644 --- a/lib/Cargo.toml +++ b/lib/Cargo.toml @@ -48,4 +48,4 @@ rocket_codegen = { version = "0.2.8", path = "../codegen" } [build-dependencies] yansi = "0.2" -version_check = "^0.1" +version_check = "0.1.2" diff --git a/lib/build.rs b/lib/build.rs index 6768de95..726b3e97 100644 --- a/lib/build.rs +++ b/lib/build.rs @@ -5,7 +5,7 @@ extern crate yansi; extern crate version_check; use yansi::Color::{Red, Yellow, Blue, White}; -use version_check::{is_nightly, is_min_version}; +use version_check::{supports_features, is_min_version}; // Specifies the minimum nightly version needed to compile Rocket. const MIN_VERSION: &'static str = "1.19.0-nightly"; @@ -20,7 +20,7 @@ macro_rules! printerr { } fn main() { - let (ok_nightly, ok_version) = (is_nightly(), is_min_version(MIN_VERSION)); + let (ok_channel, ok_version) = (supports_features(), is_min_version(MIN_VERSION)); let print_version_err = |version: &str| { printerr!("{} {}. {} {}.", White.paint("Installed version is:"), @@ -29,11 +29,11 @@ fn main() { Yellow.paint(MIN_VERSION)); }; - if let (Some(is_nightly), Some((ok_version, version))) = (ok_nightly, ok_version) { - if !is_nightly { + if let (Some(ok_channel), Some((ok_version, version))) = (ok_channel, ok_version) { + if !ok_channel { printerr!("{} {}", Red.paint("Error:").bold(), - White.paint("Rocket requires a nightly version of Rust.")); + White.paint("Rocket requires a nightly or dev version of Rust.")); print_version_err(&*version); printerr!("{}{}{}", Blue.paint("See the getting started guide ("),