aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHaibo Huang <hhb@google.com>2020-11-05 04:25:36 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2020-11-05 04:25:36 +0000
commit5da145e9d6169f34f30935ac3a5953f3b083bb9d (patch)
tree66333ecac74c5b21a5d6b4d4d2b354e4e7556c19
parent7be029b9172a9d84bc76d82e0a8cefe5e54ec28b (diff)
parent8f7a116898aedc75f9b1601e69affa5fda440a7d (diff)
downloadnum-derive-5da145e9d6169f34f30935ac3a5953f3b083bb9d.tar.gz
Upgrade rust/crates/num-derive to 0.3.3 am: b858c52f1f am: 4dd1a71c2a am: 8f7a116898
Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/num-derive/+/1480701 Change-Id: I03aaa57e9e738c0367bf8762ae06e9e4703bbf2a
-rw-r--r--.cargo_vcs_info.json2
-rw-r--r--Android.bp4
-rw-r--r--Cargo.toml4
-rw-r--r--Cargo.toml.orig4
-rw-r--r--METADATA8
-rw-r--r--README.md15
-rw-r--r--RELEASES.md6
-rw-r--r--src/lib.rs20
8 files changed, 42 insertions, 21 deletions
diff --git a/.cargo_vcs_info.json b/.cargo_vcs_info.json
index 4655458..ccd68a1 100644
--- a/.cargo_vcs_info.json
+++ b/.cargo_vcs_info.json
@@ -1,5 +1,5 @@
{
"git": {
- "sha1": "2d19853d0d6c36f22c0e0c492e21aa086bee9894"
+ "sha1": "61a6e5294ec133448b1fb8da35e152a0cedbf870"
}
}
diff --git a/Android.bp b/Android.bp
index ed47447..6d9d1eb 100644
--- a/Android.bp
+++ b/Android.bp
@@ -13,7 +13,7 @@ rust_proc_macro {
}
// dependent_library ["feature_list"]
-// proc-macro2-1.0.23 "default,proc-macro"
+// proc-macro2-1.0.24 "default,proc-macro"
// quote-1.0.7 "default,proc-macro"
-// syn-1.0.42 "clone-impls,default,derive,parsing,printing,proc-macro,quote"
+// syn-1.0.48 "clone-impls,default,derive,parsing,printing,proc-macro,quote"
// unicode-xid-0.2.1 "default"
diff --git a/Cargo.toml b/Cargo.toml
index f682668..90c5d27 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -13,7 +13,7 @@
[package]
edition = "2018"
name = "num-derive"
-version = "0.3.2"
+version = "0.3.3"
authors = ["The Rust Project Developers"]
exclude = ["/bors.toml", "/ci/*", "/.github/*"]
description = "Numeric syntax extensions"
@@ -22,7 +22,7 @@ documentation = "https://docs.rs/num-derive"
readme = "README.md"
keywords = ["mathematics", "numerics"]
categories = ["science"]
-license = "MIT/Apache-2.0"
+license = "MIT OR Apache-2.0"
repository = "https://github.com/rust-num/num-derive"
[lib]
diff --git a/Cargo.toml.orig b/Cargo.toml.orig
index 97b8729..5addf90 100644
--- a/Cargo.toml.orig
+++ b/Cargo.toml.orig
@@ -5,10 +5,10 @@ documentation = "https://docs.rs/num-derive"
homepage = "https://github.com/rust-num/num-derive"
keywords = ["mathematics", "numerics"]
categories = [ "science" ]
-license = "MIT/Apache-2.0"
+license = "MIT OR Apache-2.0"
name = "num-derive"
repository = "https://github.com/rust-num/num-derive"
-version = "0.3.2"
+version = "0.3.3"
readme = "README.md"
exclude = ["/bors.toml", "/ci/*", "/.github/*"]
edition = "2018"
diff --git a/METADATA b/METADATA
index 3f221ec..7fc100b 100644
--- a/METADATA
+++ b/METADATA
@@ -7,13 +7,13 @@ third_party {
}
url {
type: ARCHIVE
- value: "https://static.crates.io/crates/num-derive/num-derive-0.3.2.crate"
+ value: "https://static.crates.io/crates/num-derive/num-derive-0.3.3.crate"
}
- version: "0.3.2"
+ version: "0.3.3"
license_type: NOTICE
last_upgrade_date {
year: 2020
- month: 8
- day: 24
+ month: 10
+ day: 29
}
}
diff --git a/README.md b/README.md
index 0ab2c09..9826cdf 100644
--- a/README.md
+++ b/README.md
@@ -52,3 +52,18 @@ Release notes are available in [RELEASES.md](RELEASES.md).
## Compatibility
The `num-derive` crate is tested for rustc 1.31 and greater.
+
+## License
+
+Licensed under either of
+
+ * [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0)
+ * [MIT license](http://opensource.org/licenses/MIT)
+
+at your option.
+
+### Contribution
+
+Unless you explicitly state otherwise, any contribution intentionally submitted
+for inclusion in the work by you, as defined in the Apache-2.0 license, shall be
+dual licensed as above, without any additional terms or conditions.
diff --git a/RELEASES.md b/RELEASES.md
index f69b62c..c3e18cc 100644
--- a/RELEASES.md
+++ b/RELEASES.md
@@ -1,3 +1,9 @@
+# Release 0.3.3 (2020-10-29)
+
+- [Make `NumOps` work with `no_std`][41] -- thanks @jedrzejboczar!
+
+[41]: https://github.com/rust-num/num-derive/pull/41
+
# Release 0.3.2 (2020-08-24)
- [Add `#[inline]` to all derived functions][40] -- thanks @Amanieu!
diff --git a/src/lib.rs b/src/lib.rs
index 96a8fd4..ef55e4b 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -565,39 +565,39 @@ pub fn num_ops(input: TokenStream) -> TokenStream {
let name = &ast.ident;
let inner_ty = newtype_inner(&ast.data).expect(NEWTYPE_ONLY);
let impl_ = quote! {
- impl ::std::ops::Add for #name {
+ impl ::core::ops::Add for #name {
type Output = Self;
#[inline]
fn add(self, other: Self) -> Self {
- #name(<#inner_ty as ::std::ops::Add>::add(self.0, other.0))
+ #name(<#inner_ty as ::core::ops::Add>::add(self.0, other.0))
}
}
- impl ::std::ops::Sub for #name {
+ impl ::core::ops::Sub for #name {
type Output = Self;
#[inline]
fn sub(self, other: Self) -> Self {
- #name(<#inner_ty as ::std::ops::Sub>::sub(self.0, other.0))
+ #name(<#inner_ty as ::core::ops::Sub>::sub(self.0, other.0))
}
}
- impl ::std::ops::Mul for #name {
+ impl ::core::ops::Mul for #name {
type Output = Self;
#[inline]
fn mul(self, other: Self) -> Self {
- #name(<#inner_ty as ::std::ops::Mul>::mul(self.0, other.0))
+ #name(<#inner_ty as ::core::ops::Mul>::mul(self.0, other.0))
}
}
- impl ::std::ops::Div for #name {
+ impl ::core::ops::Div for #name {
type Output = Self;
#[inline]
fn div(self, other: Self) -> Self {
- #name(<#inner_ty as ::std::ops::Div>::div(self.0, other.0))
+ #name(<#inner_ty as ::core::ops::Div>::div(self.0, other.0))
}
}
- impl ::std::ops::Rem for #name {
+ impl ::core::ops::Rem for #name {
type Output = Self;
#[inline]
fn rem(self, other: Self) -> Self {
- #name(<#inner_ty as ::std::ops::Rem>::rem(self.0, other.0))
+ #name(<#inner_ty as ::core::ops::Rem>::rem(self.0, other.0))
}
}
};