num-complex
Advanced tools
| { | ||
| "git": { | ||
| "sha1": "29561b5441ad5e0f61029b1402a852389f17bdc7" | ||
| }, | ||
| "path_in_vcs": "" | ||
| } |
+30
| extern crate autocfg; | ||
| fn main() { | ||
| autocfg::rerun_path("build.rs"); | ||
| autocfg::emit_possibility(HAS_DERIVE); | ||
| if std::env::var_os("CARGO_FEATURE_RUSTC_SERIALIZE").is_some() { | ||
| let ac = autocfg::new(); | ||
| // These built-in derives are being removed! (rust-lang/rust#134272) | ||
| // | ||
| // It's hard to directly probe for `derive(RustcDecodable, RustcEncodable)`, because that | ||
| // depends on the external `rustc-serialize` dependency. They're in `prelude::v1` where we | ||
| // can probe by path, but ironically only on relatively new versions, so we're also using | ||
| // *inaccessible* `rust_2024` as a proxy for older versions. | ||
| if ac.probe_raw(PRELUDE_DERIVE).is_ok() || !ac.probe_path(RUST_2024) { | ||
| autocfg::emit(HAS_DERIVE); | ||
| } else { | ||
| println!("cargo:warning=rustc-serialize is not supported by the current compiler"); | ||
| } | ||
| } | ||
| } | ||
| const HAS_DERIVE: &str = "has_derive_rustc_serialize"; | ||
| const PRELUDE_DERIVE: &str = " | ||
| #[allow(soft_unstable, deprecated)] | ||
| pub use std::prelude::v1::{RustcDecodable, RustcEncodable}; | ||
| "; | ||
| const RUST_2024: &str = "std::prelude::rust_2024"; |
+40
| # This file is automatically @generated by Cargo. | ||
| # It is not intended for manual editing. | ||
| version = 4 | ||
| [[package]] | ||
| name = "autocfg" | ||
| version = "1.4.0" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" | ||
| [[package]] | ||
| name = "num-complex" | ||
| version = "0.1.44" | ||
| dependencies = [ | ||
| "autocfg", | ||
| "num-traits", | ||
| "rustc-serialize", | ||
| "serde", | ||
| ] | ||
| [[package]] | ||
| name = "num-traits" | ||
| version = "0.2.19" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" | ||
| dependencies = [ | ||
| "autocfg", | ||
| ] | ||
| [[package]] | ||
| name = "rustc-serialize" | ||
| version = "0.3.25" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "fe834bc780604f4674073badbad26d7219cadfb4a2275802db12cbae17498401" | ||
| [[package]] | ||
| name = "serde" | ||
| version = "0.7.0" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "90527ab4abff2f0608cdb1a78e2349180e1d92059f59b5a65ce2a1a15a499b73" |
+6
-1
| language: rust | ||
| rust: | ||
| - 1.8.0 | ||
| - stable | ||
| - beta | ||
| - nightly | ||
| matrix: | ||
| include: | ||
| - rust: 1.19.0 | ||
| before_script: | ||
| - cargo generate-lockfile | ||
| - cargo update -p num-traits --precise 0.2.15 | ||
| sudo: false | ||
@@ -8,0 +13,0 @@ script: |
+28
-8
@@ -6,13 +6,18 @@ # THIS FILE IS AUTOMATICALLY GENERATED BY CARGO | ||
| # with all versions of Cargo and also rewrite `path` dependencies | ||
| # to registry (e.g. crates.io) dependencies | ||
| # to registry (e.g., crates.io) dependencies. | ||
| # | ||
| # If you believe there's an error in this file please file an | ||
| # issue against the rust-lang/cargo repository. If you're | ||
| # editing this file be aware that the upstream Cargo.toml | ||
| # will likely look very different (and much more reasonable) | ||
| # If you are reading this file be aware that the original Cargo.toml | ||
| # will likely look very different (and much more reasonable). | ||
| # See Cargo.toml.orig for the original contents. | ||
| [package] | ||
| name = "num-complex" | ||
| version = "0.1.43" | ||
| version = "0.1.44" | ||
| authors = ["The Rust Project Developers"] | ||
| build = "build.rs" | ||
| autolib = false | ||
| autobins = false | ||
| autoexamples = false | ||
| autotests = false | ||
| autobenches = false | ||
| description = "Complex numbers implementation for Rust" | ||
@@ -22,6 +27,18 @@ homepage = "https://github.com/rust-num/num-complex" | ||
| readme = "README.md" | ||
| keywords = ["mathematics", "numerics"] | ||
| categories = ["algorithms", "data-structures", "science"] | ||
| keywords = [ | ||
| "mathematics", | ||
| "numerics", | ||
| ] | ||
| categories = [ | ||
| "algorithms", | ||
| "data-structures", | ||
| "science", | ||
| ] | ||
| license = "MIT/Apache-2.0" | ||
| repository = "https://github.com/rust-num/num-complex" | ||
| [lib] | ||
| name = "num_complex" | ||
| path = "src/lib.rs" | ||
| [dependencies.num-traits] | ||
@@ -40,4 +57,7 @@ version = "0.2.0" | ||
| [build-dependencies.autocfg] | ||
| version = "1.4.0" | ||
| [features] | ||
| default = ["rustc-serialize"] | ||
| unstable = [] |
+6
-2
| #!/bin/sh | ||
| # Use rustup to locally run the same suite of tests as .travis.yml. | ||
| # (You should first install/update 1.8.0, stable, beta, and nightly.) | ||
| # (You should first install/update 1.19.0, stable, beta, and nightly.) | ||
@@ -8,6 +8,10 @@ set -ex | ||
| export TRAVIS_RUST_VERSION | ||
| for TRAVIS_RUST_VERSION in 1.8.0 stable beta nightly; do | ||
| for TRAVIS_RUST_VERSION in 1.19.0 stable beta nightly; do | ||
| run="rustup run $TRAVIS_RUST_VERSION" | ||
| $run cargo generate-lockfile | ||
| if [ "$TRAVIS_RUST_VERSION" = 1.19.0 ]; then | ||
| $run cargo update -p num-traits --precise 0.2.15 | ||
| fi | ||
| $run cargo build --verbose | ||
| $run $PWD/ci/test_full.sh | ||
| done |
+2
-2
@@ -5,3 +5,3 @@ # num-complex | ||
| [](https://docs.rs/num-complex) | ||
|  | ||
|  | ||
| [](https://travis-ci.org/rust-num/num-complex) | ||
@@ -32,2 +32,2 @@ | ||
| The `num-complex` crate is tested for rustc 1.8 and greater. | ||
| The `num-complex` crate is tested for rustc 1.19 and greater. |
+6
-0
@@ -0,1 +1,7 @@ | ||
| # Release 0.1.44 | ||
| - [Disable `rustc-serialize` derives for future compilers.][137] | ||
| [137]: https://github.com/rust-num/num-complex/pull/137 | ||
| # Release 0.1.43 | ||
@@ -2,0 +8,0 @@ |
+3
-2
@@ -15,5 +15,6 @@ // Copyright 2013 The Rust Project Developers. See the COPYRIGHT | ||
| //! | ||
| //! The `num-complex` crate is tested for rustc 1.8 and greater. | ||
| //! The `num-complex` crate is tested for rustc 1.19 and greater. | ||
| #![doc(html_root_url = "https://docs.rs/num-complex/0.1")] | ||
| #![cfg_attr(has_derive_rustc_serialize, warn(soft_unstable))] // un-deny | ||
@@ -66,3 +67,3 @@ extern crate num_traits as traits; | ||
| #[derive(PartialEq, Eq, Copy, Clone, Hash, Debug, Default)] | ||
| #[cfg_attr(feature = "rustc-serialize", derive(RustcEncodable, RustcDecodable))] | ||
| #[cfg_attr(has_derive_rustc_serialize, derive(RustcEncodable, RustcDecodable))] | ||
| #[repr(C)] | ||
@@ -69,0 +70,0 @@ pub struct Complex<T> { |
Sorry, the diff of this file is not supported yet