diff options
author | Haibo Huang <hhb@google.com> | 2020-11-05 05:04:01 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2020-11-05 05:04:01 +0000 |
commit | 04127802229606eb18abc72ba09896e2b5f97fa3 (patch) | |
tree | 66333ecac74c5b21a5d6b4d4d2b354e4e7556c19 | |
parent | e6ce4232ca332ecc0e0b00a0d28ecf77b47350c5 (diff) | |
parent | 5da145e9d6169f34f30935ac3a5953f3b083bb9d (diff) | |
download | num-derive-04127802229606eb18abc72ba09896e2b5f97fa3.tar.gz |
Upgrade rust/crates/num-derive to 0.3.3 am: b858c52f1f am: 4dd1a71c2a am: 8f7a116898 am: 5da145e9d6
Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/num-derive/+/1480701
Change-Id: Ifca4ba32c3d5f497ccccf4106da510ee3bbb7288
-rw-r--r-- | .cargo_vcs_info.json | 2 | ||||
-rw-r--r-- | Android.bp | 4 | ||||
-rw-r--r-- | Cargo.toml | 4 | ||||
-rw-r--r-- | Cargo.toml.orig | 4 | ||||
-rw-r--r-- | METADATA | 8 | ||||
-rw-r--r-- | README.md | 15 | ||||
-rw-r--r-- | RELEASES.md | 6 | ||||
-rw-r--r-- | src/lib.rs | 20 |
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" } } @@ -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" @@ -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" @@ -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 } } @@ -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! @@ -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)) } } }; |