summaryrefslogtreecommitdiffstats
path: root/vendor/zerovec-derive
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/zerovec-derive')
-rw-r--r--vendor/zerovec-derive/.cargo-checksum.json2
-rw-r--r--vendor/zerovec-derive/Cargo.lock45
-rw-r--r--vendor/zerovec-derive/Cargo.toml8
-rw-r--r--vendor/zerovec-derive/src/make_varule.rs16
4 files changed, 39 insertions, 32 deletions
diff --git a/vendor/zerovec-derive/.cargo-checksum.json b/vendor/zerovec-derive/.cargo-checksum.json
index 2b18eb43b..c8b3d36ae 100644
--- a/vendor/zerovec-derive/.cargo-checksum.json
+++ b/vendor/zerovec-derive/.cargo-checksum.json
@@ -1 +1 @@
-{"files":{"Cargo.lock":"45317edd3e500bc9c1b4a5bdbdd818d9675d354f0a635c2b515206a98ca671c0","Cargo.toml":"45b4d104f456e16a84efc97ab6ebdacdc3dac27438d1aba3468e9f390daeab0b","LICENSE":"4ad7541d66a407234e2c84902124cef325c29f3e966353efdb800bedb8b8da21","README.md":"77ca5a17524e17ae9098ab00f91cb67996f5a298468d68a15d23a09bde940b9a","examples/derives.rs":"2541311f2b532301ab8600927fb2d12a842166ce98d57879997df12dcb928dd2","examples/make.rs":"58373c89f49e5c7b343d3ab0cb746a062ea1f6aa8839707751bcee484126e77b","examples/make_var.rs":"8faac589bdfa89bb3e5b97553d2fad1aeebf914586731d26433b3dce966d1523","src/lib.rs":"4f4f2a1c0f0204ac782d741f9a188b474b9c0e23a5e6e4619b9a3e926c1e08e5","src/make_ule.rs":"892a6332a6ca29c51899d00e3581a240306e54842cd21ef26d2d496065278144","src/make_varule.rs":"adb44d66eab1cee9f785d2088115a49a8ae47c16d171e606bbb2bbc626906cd4","src/ule.rs":"1f0a46ff39e43bb19deb9e9a06289350096d4e6ca3f33cb76fec3c84c4a439d8","src/utils.rs":"54cd3a6b39c74dc6e12a4019c14ae2f5dd197e8a678dfbf3158dab61d496deac","src/varule.rs":"b0642df70023b2f04aca692010f6b2a81fd3f3db8612dbae072a200eb04f0913"},"package":"490e5f878c2856225e884c35927e7ea6db3c24cdb7229b72542c7526ad7ed49e"} \ No newline at end of file
+{"files":{"Cargo.lock":"2d7d59a1d4b4efeb00fbab029b36910c0caa82aba59c7490a027c6c568e0a8f6","Cargo.toml":"b80ff2c76944c3d016cb05b21c9c20af190e3492c1961a7a0d69b3ba5b4ae868","LICENSE":"4ad7541d66a407234e2c84902124cef325c29f3e966353efdb800bedb8b8da21","README.md":"77ca5a17524e17ae9098ab00f91cb67996f5a298468d68a15d23a09bde940b9a","examples/derives.rs":"2541311f2b532301ab8600927fb2d12a842166ce98d57879997df12dcb928dd2","examples/make.rs":"58373c89f49e5c7b343d3ab0cb746a062ea1f6aa8839707751bcee484126e77b","examples/make_var.rs":"8faac589bdfa89bb3e5b97553d2fad1aeebf914586731d26433b3dce966d1523","src/lib.rs":"4f4f2a1c0f0204ac782d741f9a188b474b9c0e23a5e6e4619b9a3e926c1e08e5","src/make_ule.rs":"892a6332a6ca29c51899d00e3581a240306e54842cd21ef26d2d496065278144","src/make_varule.rs":"e5e037b18f9533e18c8078c532198995437dd08774f773ada01d901cfdef9bac","src/ule.rs":"1f0a46ff39e43bb19deb9e9a06289350096d4e6ca3f33cb76fec3c84c4a439d8","src/utils.rs":"54cd3a6b39c74dc6e12a4019c14ae2f5dd197e8a678dfbf3158dab61d496deac","src/varule.rs":"b0642df70023b2f04aca692010f6b2a81fd3f3db8612dbae072a200eb04f0913"},"package":"2154cb6e2a748163354165e22c6a555effb09ca2d16334767bf66bb404f2206e"} \ No newline at end of file
diff --git a/vendor/zerovec-derive/Cargo.lock b/vendor/zerovec-derive/Cargo.lock
index 06c4b36b2..a5a1a0bf0 100644
--- a/vendor/zerovec-derive/Cargo.lock
+++ b/vendor/zerovec-derive/Cargo.lock
@@ -13,48 +13,48 @@ dependencies = [
[[package]]
name = "itoa"
-version = "1.0.3"
+version = "1.0.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6c8af84674fe1f223a982c933a0ee1086ac4d4052aa0fb8060c12c6ad838e754"
+checksum = "fad582f4b9e86b6caa621cabeb0963332d92eea04729ab12892c2533951e6440"
[[package]]
name = "proc-macro2"
-version = "1.0.44"
+version = "1.0.50"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7bd7356a8122b6c4a24a82b278680c73357984ca2fc79a0f9fa6dea7dced7c58"
+checksum = "6ef7d57beacfaf2d8aee5937dab7b7f28de3cb8b1828479bb5de2a7106f2bae2"
dependencies = [
"unicode-ident",
]
[[package]]
name = "quote"
-version = "1.0.21"
+version = "1.0.23"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bbe448f377a7d6961e30f5955f9b8d106c3f5e449d493ee1b125c1d43c2b5179"
+checksum = "8856d8364d252a14d474036ea1358d63c9e6965c8e5c1885c18f73d70bff9c7b"
dependencies = [
"proc-macro2",
]
[[package]]
name = "ryu"
-version = "1.0.11"
+version = "1.0.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4501abdff3ae82a1c1b477a17252eb69cee9e66eb915c1abaa4f44d873df9f09"
+checksum = "7b4b9743ed687d4b4bcedf9ff5eaa7398495ae14e61cba0a295704edbc7decde"
[[package]]
name = "serde"
-version = "1.0.145"
+version = "1.0.152"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "728eb6351430bccb993660dfffc5a72f91ccc1295abaa8ce19b27ebe4f75568b"
+checksum = "bb7d1f0d3021d347a83e556fc4683dea2ea09d87bccdf88ff5c12545d89d5efb"
dependencies = [
"serde_derive",
]
[[package]]
name = "serde_derive"
-version = "1.0.145"
+version = "1.0.152"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "81fa1584d3d1bcacd84c277a0dfe21f5b0f6accf4a23d04d4c6d61f1af522b4c"
+checksum = "af487d118eecd09402d70a5d72551860e788df87b464af30e5ea6a38c75c541e"
dependencies = [
"proc-macro2",
"quote",
@@ -63,9 +63,9 @@ dependencies = [
[[package]]
name = "serde_json"
-version = "1.0.85"
+version = "1.0.91"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e55a28e3aaef9d5ce0506d0a14dbba8054ddc7e499ef522dd8b26859ec9d4a44"
+checksum = "877c235533714907a8c2464236f5c4b2a17262ef1bd71f38f35ea592c8da6883"
dependencies = [
"itoa",
"ryu",
@@ -74,9 +74,9 @@ dependencies = [
[[package]]
name = "syn"
-version = "1.0.101"
+version = "1.0.107"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e90cde112c4b9690b8cbe810cba9ddd8bc1d7472e2cae317b69e9438c1cba7d2"
+checksum = "1f4064b5b16e03ae50984a5a8ed5d4f8803e6bc1fd170a3cda91a1be4b18e3f5"
dependencies = [
"proc-macro2",
"quote",
@@ -97,9 +97,9 @@ dependencies = [
[[package]]
name = "unicode-ident"
-version = "1.0.4"
+version = "1.0.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "dcc811dc4066ac62f84f11307873c4850cb653bfa9b1719cee2bd2204a4bc5dd"
+checksum = "84a22b9f218b40614adcb3f4ff08b703773ad44fa9423e4e0d346d5db86e4ebc"
[[package]]
name = "unicode-xid"
@@ -108,14 +108,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c"
[[package]]
-name = "zerofrom"
-version = "0.1.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "79e9355fccf72b04b7deaa99ce7a0f6630530acf34045391b74460fcd714de54"
-
-[[package]]
name = "zerovec-derive"
-version = "0.9.0"
+version = "0.9.3"
dependencies = [
"bincode",
"proc-macro2",
@@ -124,5 +118,4 @@ dependencies = [
"serde_json",
"syn",
"synstructure",
- "zerofrom",
]
diff --git a/vendor/zerovec-derive/Cargo.toml b/vendor/zerovec-derive/Cargo.toml
index fea429984..d9c2a0592 100644
--- a/vendor/zerovec-derive/Cargo.toml
+++ b/vendor/zerovec-derive/Cargo.toml
@@ -12,7 +12,7 @@
[package]
edition = "2018"
name = "zerovec-derive"
-version = "0.9.0"
+version = "0.9.3"
authors = ["Manish Goregaokar <manishsmail@gmail.com>"]
description = "Custom derive for the zerovec crate"
keywords = [
@@ -32,6 +32,9 @@ license = "Unicode-DFS-2016"
repository = "https://github.com/unicode-org/icu4x"
resolver = "2"
+[package.metadata.workspaces]
+independent = true
+
[lib]
path = "src/lib.rs"
proc_macro = true
@@ -61,6 +64,3 @@ features = ["derive"]
[dev-dependencies.serde_json]
version = "1.0"
-
-[dev-dependencies.zerofrom]
-version = "0.1"
diff --git a/vendor/zerovec-derive/src/make_varule.rs b/vendor/zerovec-derive/src/make_varule.rs
index 7dda4932e..3220b0f8a 100644
--- a/vendor/zerovec-derive/src/make_varule.rs
+++ b/vendor/zerovec-derive/src/make_varule.rs
@@ -115,7 +115,6 @@ pub fn make_varule_impl(attr: AttributeArgs, mut input: DeriveInput) -> TokenStr
let doc = format!("[`VarULE`](zerovec::ule::VarULE) type for {name}");
let varule_struct: DeriveInput = parse_quote!(
#[repr(#repr_attr)]
- #[derive(PartialEq, Eq)]
#[doc = #doc]
#vis struct #ule_name #field_inits #semi
);
@@ -142,6 +141,19 @@ pub fn make_varule_impl(attr: AttributeArgs, mut input: DeriveInput) -> TokenStr
input.span(),
);
+ let eq_impl = quote!(
+ impl core::cmp::PartialEq for #ule_name {
+ fn eq(&self, other: &Self) -> bool {
+ // The VarULE invariants allow us to assume that equality is byte equality
+ // in non-safety-critical contexts
+ <Self as zerovec::ule::VarULE>::as_byte_slice(&self)
+ == <Self as zerovec::ule::VarULE>::as_byte_slice(&other)
+ }
+ }
+
+ impl core::cmp::Eq for #ule_name {}
+ );
+
let zerofrom_fq_path =
quote!(<#name as zerovec::__zerovec_internal_reexport::ZeroFrom<#ule_name>>);
@@ -234,6 +246,8 @@ pub fn make_varule_impl(attr: AttributeArgs, mut input: DeriveInput) -> TokenStr
#maybe_ord_impls
+ #eq_impl
+
#zmkv
#maybe_ser