rust-newtype-derive-Update-dependencies.patch 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. From a3013a748fdcceb09f7db287e7bddfc162b903fe Mon Sep 17 00:00:00 2001
  2. From: Igor Gnatenko <i.gnatenko.brain@gmail.com>
  3. Date: Tue, 5 Dec 2017 14:10:43 +0100
  4. Subject: [PATCH] bump rustc_version to 0.2
  5. Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
  6. Upstream: <https://github.com/DanielKeep/rust-custom-derive/pull/37>
  7. ---
  8. newtype_derive/Cargo.toml | 2 +-
  9. newtype_derive/build.rs | 4 ++--
  10. 2 files changed, 3 insertions(+), 3 deletions(-)
  11. diff --git a/newtype_derive/Cargo.toml b/newtype_derive/Cargo.toml
  12. index 3c46f4e..b2aa83e 100644
  13. --- a/Cargo.toml
  14. +++ b/Cargo.toml
  15. @@ -17,7 +17,7 @@ std = []
  16. std-unstable = []
  17. [build-dependencies]
  18. -rustc_version = "0.1.7"
  19. +rustc_version = "0.2"
  20. [dev-dependencies]
  21. macro-attr = { version = "0.2.1", path = ".." }
  22. diff --git a/build.rs b/build.rs
  23. index c617b37..e4a10e0 100644
  24. --- a/build.rs
  25. +++ b/build.rs
  26. @@ -8,12 +8,12 @@ files in the project carrying such notice may not be copied, modified,
  27. or distributed except according to those terms.
  28. */
  29. extern crate rustc_version;
  30. -use rustc_version::{version_matches};
  31. +use rustc_version::{version, Version};
  32. fn main() {
  33. println!("cargo:rerun-if-changed=build.rs");
  34. - if version_matches("1.8.0") {
  35. + if version().unwrap() >= Version::parse("1.8.0").unwrap() {
  36. println!("cargo:rustc-cfg=op_assign");
  37. }
  38. }