diff --git a/newtype_derive/Cargo.toml b/newtype_derive/Cargo.toml index 3c46f4e..b2aa83e 100644 --- a/newtype_derive/Cargo.toml +++ b/newtype_derive/Cargo.toml @@ -17,7 +17,7 @@ std = [] std-unstable = [] [build-dependencies] -rustc_version = "0.1.7" +rustc_version = "0.2" [dev-dependencies] macro-attr = { version = "0.2.1", path = ".." } diff --git a/newtype_derive/build.rs b/newtype_derive/build.rs index c617b37..e4a10e0 100644 --- a/newtype_derive/build.rs +++ b/newtype_derive/build.rs @@ -8,12 +8,12 @@ files in the project carrying such notice may not be copied, modified, or distributed except according to those terms. */ extern crate rustc_version; -use rustc_version::{version_matches}; +use rustc_version::{version, Version}; fn main() { println!("cargo:rerun-if-changed=build.rs"); - if version_matches("1.8.0") { + if version().unwrap() >= Version::parse("1.8.0").unwrap() { println!("cargo:rustc-cfg=op_assign"); } }