summaryrefslogtreecommitdiffstats
path: root/vendor/icu_list
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-07 05:48:48 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-07 05:48:48 +0000
commitef24de24a82fe681581cc130f342363c47c0969a (patch)
tree0d494f7e1a38b95c92426f58fe6eaa877303a86c /vendor/icu_list
parentReleasing progress-linux version 1.74.1+dfsg1-1~progress7.99u1. (diff)
downloadrustc-ef24de24a82fe681581cc130f342363c47c0969a.tar.xz
rustc-ef24de24a82fe681581cc130f342363c47c0969a.zip
Merging upstream version 1.75.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'vendor/icu_list')
-rw-r--r--vendor/icu_list/.cargo-checksum.json2
-rw-r--r--vendor/icu_list/Cargo.lock147
-rw-r--r--vendor/icu_list/Cargo.toml49
-rw-r--r--vendor/icu_list/LICENSE79
-rw-r--r--vendor/icu_list/README.md22
-rw-r--r--vendor/icu_list/examples/and_list.rs8
-rw-r--r--vendor/icu_list/src/lib.rs15
-rw-r--r--vendor/icu_list/src/list_formatter.rs120
-rw-r--r--vendor/icu_list/src/provider/mod.rs35
-rw-r--r--vendor/icu_list/src/provider/serde_dfa.rs3
10 files changed, 302 insertions, 178 deletions
diff --git a/vendor/icu_list/.cargo-checksum.json b/vendor/icu_list/.cargo-checksum.json
index d34fa5ecc..010046b4a 100644
--- a/vendor/icu_list/.cargo-checksum.json
+++ b/vendor/icu_list/.cargo-checksum.json
@@ -1 +1 @@
-{"files":{"Cargo.lock":"cefda77167195f381333aefff397aa2429d8e473bca513b0b29695f398af9e14","Cargo.toml":"eef1bfb098c481a664c49b1e331e09fd254fc472815437894bf8d1f08014fe07","LICENSE":"4ad7541d66a407234e2c84902124cef325c29f3e966353efdb800bedb8b8da21","README.md":"33b424bdceea5edc4d3638592b007bf825e25a96e7fe9101a3ad04ea63637150","examples/and_list.rs":"76af2fbe31c6641a360726b201bfb043a35ee8dcf37b626640221fe889b194e4","src/error.rs":"74a114b135c2f972f6f9ad466b6c342dbd89de293aac7d89fbcd9d58c1aaa48e","src/lazy_automaton.rs":"eff2e95ae5c889908ba71480e73fc31d9cb2e793e9dc6dee8683c686e8ed8019","src/lib.rs":"d56881d78a298600f779986555d82b3d0be81c5472096e5fc3b80844b6389724","src/list_formatter.rs":"c7b1e2c6c49145cb62e6948dc60c384e46bba333a3a490c84360a1cd795965a2","src/patterns.rs":"3013aca1dd51d1b9a98e8573abac9116650635b2931157e9fb16ee10c8d3ab9c","src/provider/mod.rs":"47a7b749e27eb6d5de3b9afecd197f990748050d4bd615fb5f19ca5c56ce56ab","src/provider/serde_dfa.rs":"da5892495d21c2d94ec5ad87e441a3c573380b258a30f7d5fb501787edabd16c"},"package":"fd7ba7442d9235b689d4fdce17c452ea229934980fd81ba50cc28275752c9f90"} \ No newline at end of file
+{"files":{"Cargo.lock":"4d526af0224a1940225d6953e31dc4cbeb3a61b7e07ddd43aae3dd25c44a26ea","Cargo.toml":"3956d251209e7800028a6d29491c6220983a996509d22ac469dac58b72408e14","LICENSE":"853f87c96f3d249f200fec6db1114427bc8bdf4afddc93c576956d78152ce978","README.md":"68ac8ccdfb9befff038b4fa8d9f0a3032ddc2069dcfd1a50ed623a36c3af5de7","examples/and_list.rs":"40799ac894eccb241559e088bc43e8eaab5271fc81926b0ceb62e356fa71dd63","src/error.rs":"74a114b135c2f972f6f9ad466b6c342dbd89de293aac7d89fbcd9d58c1aaa48e","src/lazy_automaton.rs":"eff2e95ae5c889908ba71480e73fc31d9cb2e793e9dc6dee8683c686e8ed8019","src/lib.rs":"2fd774fb952fadb2dc15ba016607dc8ce73ba5142d25cbe6ecd235fe23d88cba","src/list_formatter.rs":"688b8fba31813e20741afef589bf9d65f0b9ff4135532ace39031d1cbdbcc18e","src/patterns.rs":"3013aca1dd51d1b9a98e8573abac9116650635b2931157e9fb16ee10c8d3ab9c","src/provider/mod.rs":"2ae163bae1446be16b8b504dd4e1c851af2c2f34cb734df19dece1a96c42ef93","src/provider/serde_dfa.rs":"87f0f233215ca9e4db23abd6a41902f7a296934f5a4a17ba1d67f8a5da79b44f"},"package":"dc1a44bbed77a7e7b555f9d7dd4b43f75ec1402b438a901d20451943d50cbd90"} \ No newline at end of file
diff --git a/vendor/icu_list/Cargo.lock b/vendor/icu_list/Cargo.lock
index 17f698f32..42cbb27b8 100644
--- a/vendor/icu_list/Cargo.lock
+++ b/vendor/icu_list/Cargo.lock
@@ -10,9 +10,9 @@ checksum = "67ba02a97a2bd10f4b59b25c7973101c79642302776489e030cd13cdab09ed15"
[[package]]
name = "databake"
-version = "0.1.4"
+version = "0.1.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3feab871d671ecc2e912e83e3a64b9b3343a224c86b999334c4c99b07cf07f52"
+checksum = "959b676312ba1aaafb2219c475560082e6b20c3bc572ec1483f93cecd748cf3d"
dependencies = [
"databake-derive",
"proc-macro2",
@@ -22,9 +22,9 @@ dependencies = [
[[package]]
name = "databake-derive"
-version = "0.1.4"
+version = "0.1.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d8b3072996668063c5fe00fcef85ee766fc01113f2fdd5e8a31d5ebae260c091"
+checksum = "5f0694dfe255f1af0289d3d1b40787bb955e8603d96e96a6b14b225926e108fb"
dependencies = [
"proc-macro2",
"quote",
@@ -34,18 +34,18 @@ dependencies = [
[[package]]
name = "deduplicating_array"
-version = "0.1.4"
+version = "0.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0b5426e8a7610ceca8b2f2c40a25ddd4476606c96a0c1e3524fdfdbeb64c1331"
+checksum = "a636096586ca093a10ac0175bfb384d024089dca0dae54e3e69bc1c1596358e8"
dependencies = [
"serde",
]
[[package]]
name = "displaydoc"
-version = "0.2.3"
+version = "0.2.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3bf95dc3f046b9da4f2d51833c0d3547d8564ef6910f5c1ed130306a75b92886"
+checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d"
dependencies = [
"proc-macro2",
"quote",
@@ -54,11 +54,13 @@ dependencies = [
[[package]]
name = "icu_list"
-version = "1.2.0"
+version = "1.3.2"
dependencies = [
"databake",
"deduplicating_array",
"displaydoc",
+ "icu_list_data",
+ "icu_locid_transform",
"icu_provider",
"postcard",
"regex-automata",
@@ -68,28 +70,56 @@ dependencies = [
]
[[package]]
+name = "icu_list_data"
+version = "1.3.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d3237583f0cb7feafabb567c4492fe9ef1d2d4113f6a8798a923273ea5de996d"
+
+[[package]]
name = "icu_locid"
-version = "1.2.0"
+version = "1.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3003f85dccfc0e238ff567693248c59153a46f4e6125ba4020b973cef4d1d335"
+checksum = "f284eb342dc49d3e9d9f3b188489d76b5d22dfb1d1a5e0d1941811253bac625c"
dependencies = [
"displaydoc",
"litemap",
"tinystr",
"writeable",
+ "zerovec",
]
[[package]]
+name = "icu_locid_transform"
+version = "1.3.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6551daf80882d8e68eee186cc19e132d8bde1b1f059a79b93384a5ca0e8fc5e7"
+dependencies = [
+ "displaydoc",
+ "icu_locid",
+ "icu_locid_transform_data",
+ "icu_provider",
+ "tinystr",
+ "zerovec",
+]
+
+[[package]]
+name = "icu_locid_transform_data"
+version = "1.3.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2a741eba5431f75eb2f1f9022d3cffabcadda6771e54fb4e77c8ba8653e4da44"
+
+[[package]]
name = "icu_provider"
-version = "1.2.0"
+version = "1.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8dc312a7b6148f7dfe098047ae2494d12d4034f48ade58d4f353000db376e305"
+checksum = "68acdef80034b5e35d8524e9817479d389a4f9774f3f0cbe1bf3884d80fd5934"
dependencies = [
"displaydoc",
"icu_locid",
"icu_provider_macros",
"serde",
"stable_deref_trait",
+ "tinystr",
"writeable",
"yoke",
"zerofrom",
@@ -98,9 +128,9 @@ dependencies = [
[[package]]
name = "icu_provider_macros"
-version = "1.2.0"
+version = "1.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "dd8b728b9421e93eff1d9f8681101b78fa745e0748c95c655c83f337044a7e10"
+checksum = "2060258edfcfe32ca7058849bf0f146cb5c59aadbedf480333c0d0002f97bc99"
dependencies = [
"proc-macro2",
"quote",
@@ -109,27 +139,27 @@ dependencies = [
[[package]]
name = "itoa"
-version = "1.0.6"
+version = "1.0.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "453ad9f582a441959e5f0d088b02ce04cfe8d51a8eaf077f12ac6d3e94164ca6"
+checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38"
[[package]]
name = "litemap"
-version = "0.7.0"
+version = "0.7.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3a04a5b2b6f54acba899926491d0a6c59d98012938ca2ab5befb281c034e8f94"
+checksum = "77a1a2647d5b7134127971a6de0d533c49de2159167e7f259c427195f87168a1"
[[package]]
name = "memchr"
-version = "2.5.0"
+version = "2.6.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d"
+checksum = "8f232d6ef707e1956a43342693d2a31e72989554d58299d7a88738cc95b0d35c"
[[package]]
name = "postcard"
-version = "1.0.4"
+version = "1.0.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cfa512cd0d087cc9f99ad30a1bf64795b67871edbead083ffc3a4dfafa59aa00"
+checksum = "d534c6e61df1c7166e636ca612d9820d486fe96ddad37f7abc671517b297488e"
dependencies = [
"cobs",
"serde",
@@ -137,18 +167,18 @@ dependencies = [
[[package]]
name = "proc-macro2"
-version = "1.0.56"
+version = "1.0.67"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2b63bdb0cd06f1f4dedf69b254734f9b45af66e4a031e42a7480257d9898b435"
+checksum = "3d433d9f1a3e8c1263d9456598b16fec66f4acc9a74dacffd35c7bb09b3a1328"
dependencies = [
"unicode-ident",
]
[[package]]
name = "quote"
-version = "1.0.26"
+version = "1.0.33"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4424af4bf778aae2051a77b60283332f386554255d722233d09fbfc7e30da2fc"
+checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae"
dependencies = [
"proc-macro2",
]
@@ -171,24 +201,24 @@ checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1"
[[package]]
name = "ryu"
-version = "1.0.13"
+version = "1.0.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f91339c0467de62360649f8d3e185ca8de4224ff281f66000de5eb2a77a79041"
+checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741"
[[package]]
name = "serde"
-version = "1.0.156"
+version = "1.0.188"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "314b5b092c0ade17c00142951e50ced110ec27cea304b1037c6969246c2469a4"
+checksum = "cf9e0fcba69a370eed61bcf2b728575f726b50b55cba78064753d708ddc7549e"
dependencies = [
"serde_derive",
]
[[package]]
name = "serde_derive"
-version = "1.0.156"
+version = "1.0.188"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d7e29c4601e36bcec74a223228dce795f4cd3616341a4af93520ca1a837c087d"
+checksum = "4eca7ac642d82aa35b60049a6eccb4be6be75e599bd2e9adb5f875a737654af2"
dependencies = [
"proc-macro2",
"quote",
@@ -197,9 +227,9 @@ dependencies = [
[[package]]
name = "serde_json"
-version = "1.0.96"
+version = "1.0.107"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "057d394a50403bcac12672b2b18fb387ab6d289d957dab67dd201875391e52f1"
+checksum = "6b420ce6e3d8bd882e9b243c6eed35dbc9a6110c9769e74b584e0d68d1f20c65"
dependencies = [
"itoa",
"ryu",
@@ -214,9 +244,9 @@ checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3"
[[package]]
name = "syn"
-version = "1.0.109"
+version = "2.0.37"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237"
+checksum = "7303ef2c05cd654186cb250d29049a24840ca25d2747c25c0381c8d9e2f582e8"
dependencies = [
"proc-macro2",
"quote",
@@ -225,9 +255,9 @@ dependencies = [
[[package]]
name = "synstructure"
-version = "0.12.6"
+version = "0.13.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f"
+checksum = "285ba80e733fac80aa4270fbcdf83772a79b80aa35c97075320abfee4a915b06"
dependencies = [
"proc-macro2",
"quote",
@@ -237,18 +267,19 @@ dependencies = [
[[package]]
name = "tinystr"
-version = "0.7.1"
+version = "0.7.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7ac3f5b6856e931e15e07b478e98c8045239829a65f9156d4fa7e7788197a5ef"
+checksum = "d5d0e245e80bdc9b4e5356fc45a72184abbc3861992603f515270e9340f5a219"
dependencies = [
"displaydoc",
+ "zerovec",
]
[[package]]
name = "unicode-ident"
-version = "1.0.8"
+version = "1.0.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e5464a87b239f13a63a501f2701565754bae92d243d4bb7eb12f6d57d2269bf4"
+checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b"
[[package]]
name = "unicode-xid"
@@ -258,15 +289,15 @@ checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c"
[[package]]
name = "writeable"
-version = "0.5.2"
+version = "0.5.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "60e49e42bdb1d5dc76f4cd78102f8f0714d32edfa3efb82286eb0f0b1fc0da0f"
+checksum = "c0af0c3d13faebf8dda0b5256fa7096a2d5ccb662f7b9f54a40fe201077ab1c2"
[[package]]
name = "yoke"
-version = "0.7.1"
+version = "0.7.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1848075a23a28f9773498ee9a0f2cf58fcbad4f8c0ccf84a210ab33c6ae495de"
+checksum = "61e38c508604d6bbbd292dadb3c02559aa7fff6b654a078a36217cad871636e4"
dependencies = [
"serde",
"stable_deref_trait",
@@ -276,9 +307,9 @@ dependencies = [
[[package]]
name = "yoke-derive"
-version = "0.7.1"
+version = "0.7.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "af46c169923ed7516eef0aa32b56d2651b229f57458ebe46b49ddd6efef5b7a2"
+checksum = "d5e19fb6ed40002bab5403ffa37e53e0e56f914a4450c8765f533018db1db35f"
dependencies = [
"proc-macro2",
"quote",
@@ -288,18 +319,18 @@ dependencies = [
[[package]]
name = "zerofrom"
-version = "0.1.2"
+version = "0.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "df54d76c3251de27615dfcce21e636c172dafb2549cd7fd93e21c66f6ca6bea2"
+checksum = "655b0814c5c0b19ade497851070c640773304939a6c0fd5f5fb43da0696d05b7"
dependencies = [
"zerofrom-derive",
]
[[package]]
name = "zerofrom-derive"
-version = "0.1.2"
+version = "0.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b4eae7c1f7d4b8eafce526bc0771449ddc2f250881ae31c50d22c032b5a1c499"
+checksum = "e6a647510471d372f2e6c2e6b7219e44d8c574d24fdc11c610a61455782f18c3"
dependencies = [
"proc-macro2",
"quote",
@@ -309,22 +340,22 @@ dependencies = [
[[package]]
name = "zerovec"
-version = "0.9.4"
+version = "0.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "198f54134cd865f437820aa3b43d0ad518af4e68ee161b444cdd15d8e567c8ea"
+checksum = "1194130c5b155bf8ae50ab16c86ab758cd695cf9ad176d2f870b744cbdbb572e"
dependencies = [
+ "yoke",
"zerofrom",
"zerovec-derive",
]
[[package]]
name = "zerovec-derive"
-version = "0.9.4"
+version = "0.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "486558732d5dde10d0f8cb2936507c1bb21bc539d924c949baf5f36a58e51bac"
+checksum = "acabf549809064225ff8878baedc4ce3732ac3b07e7c7ce6e5c2ccdbc485c324"
dependencies = [
"proc-macro2",
"quote",
"syn",
- "synstructure",
]
diff --git a/vendor/icu_list/Cargo.toml b/vendor/icu_list/Cargo.toml
index 0374bf280..548a48a63 100644
--- a/vendor/icu_list/Cargo.toml
+++ b/vendor/icu_list/Cargo.toml
@@ -11,49 +11,56 @@
[package]
edition = "2021"
+rust-version = "1.66"
name = "icu_list"
-version = "1.2.0"
+version = "1.3.2"
authors = ["The ICU4X Project Developers"]
-include = [
- "src/**/*",
- "examples/**/*",
- "benches/**/*",
- "tests/**/*",
- "Cargo.toml",
- "LICENSE",
- "README.md",
-]
description = "ECMA-402 ListFormatter"
+homepage = "https://icu4x.unicode.org"
readme = "README.md"
categories = ["internationalization"]
-license = "Unicode-DFS-2016"
+license-file = "LICENSE"
repository = "https://github.com/unicode-org/icu4x"
-[package.metadata.docs.rs]
-all-features = true
-
[package.metadata.cargo-all-features]
denylist = ["bench"]
+[package.metadata.docs.rs]
+all-features = true
+
[[example]]
name = "and_list"
[dependencies.databake]
-version = "0.1.3"
+version = "0.1.6"
features = ["derive"]
optional = true
+default-features = false
[dependencies.deduplicating_array]
-version = "0.1.3"
+version = "0.1.5"
optional = true
+default-features = false
[dependencies.displaydoc]
version = "0.2.3"
default-features = false
+[dependencies.icu_list_data]
+version = "~1.3.2"
+optional = true
+default-features = false
+
+[dependencies.icu_locid_transform]
+version = "~1.3.2"
+features = ["compiled_data"]
+optional = true
+default-features = false
+
[dependencies.icu_provider]
-version = "1.2.0"
+version = "~1.3.2"
features = ["macros"]
+default-features = false
[dependencies.regex-automata]
version = "0.2"
@@ -69,7 +76,8 @@ optional = true
default-features = false
[dependencies.writeable]
-version = "0.5.1"
+version = "0.5.3"
+default-features = false
[dev-dependencies.postcard]
version = "1.0.0"
@@ -81,12 +89,17 @@ version = "1"
[features]
bench = []
+compiled_data = [
+ "dep:icu_list_data",
+ "dep:icu_locid_transform",
+]
datagen = [
"serde",
"std",
"dep:databake",
"regex-automata/alloc",
]
+default = ["compiled_data"]
serde = [
"dep:deduplicating_array",
"dep:serde",
diff --git a/vendor/icu_list/LICENSE b/vendor/icu_list/LICENSE
index 9858d01ab..9845aa5f4 100644
--- a/vendor/icu_list/LICENSE
+++ b/vendor/icu_list/LICENSE
@@ -1,49 +1,42 @@
-UNICODE, INC. LICENSE AGREEMENT - DATA FILES AND SOFTWARE
-
-See Terms of Use <https://www.unicode.org/copyright.html>
-for definitions of Unicode Inc.’s Data Files and Software.
-
-NOTICE TO USER: Carefully read the following legal agreement.
-BY DOWNLOADING, INSTALLING, COPYING OR OTHERWISE USING UNICODE INC.'S
-DATA FILES ("DATA FILES"), AND/OR SOFTWARE ("SOFTWARE"),
-YOU UNEQUIVOCALLY ACCEPT, AND AGREE TO BE BOUND BY, ALL OF THE
-TERMS AND CONDITIONS OF THIS AGREEMENT.
-IF YOU DO NOT AGREE, DO NOT DOWNLOAD, INSTALL, COPY, DISTRIBUTE OR USE
-THE DATA FILES OR SOFTWARE.
+UNICODE LICENSE V3
COPYRIGHT AND PERMISSION NOTICE
-Copyright © 1991-2022 Unicode, Inc. All rights reserved.
-Distributed under the Terms of Use in https://www.unicode.org/copyright.html.
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of the Unicode data files and any associated documentation
-(the "Data Files") or Unicode software and any associated documentation
-(the "Software") to deal in the Data Files or Software
-without restriction, including without limitation the rights to use,
-copy, modify, merge, publish, distribute, and/or sell copies of
-the Data Files or Software, and to permit persons to whom the Data Files
-or Software are furnished to do so, provided that either
-(a) this copyright and permission notice appear with all copies
-of the Data Files or Software, or
-(b) this copyright and permission notice appear in associated
-Documentation.
-
-THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF
-ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
-WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT OF THIRD PARTY RIGHTS.
-IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS
-NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL
-DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
-DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
-TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
-PERFORMANCE OF THE DATA FILES OR SOFTWARE.
-
-Except as contained in this notice, the name of a copyright holder
-shall not be used in advertising or otherwise to promote the sale,
-use or other dealings in these Data Files or Software without prior
-written authorization of the copyright holder.
+Copyright © 2020-2023 Unicode, Inc.
+
+NOTICE TO USER: Carefully read the following legal agreement. BY
+DOWNLOADING, INSTALLING, COPYING OR OTHERWISE USING DATA FILES, AND/OR
+SOFTWARE, YOU UNEQUIVOCALLY ACCEPT, AND AGREE TO BE BOUND BY, ALL OF THE
+TERMS AND CONDITIONS OF THIS AGREEMENT. IF YOU DO NOT AGREE, DO NOT
+DOWNLOAD, INSTALL, COPY, DISTRIBUTE OR USE THE DATA FILES OR SOFTWARE.
+
+Permission is hereby granted, free of charge, to any person obtaining a
+copy of data files and any associated documentation (the "Data Files") or
+software and any associated documentation (the "Software") to deal in the
+Data Files or Software without restriction, including without limitation
+the rights to use, copy, modify, merge, publish, distribute, and/or sell
+copies of the Data Files or Software, and to permit persons to whom the
+Data Files or Software are furnished to do so, provided that either (a)
+this copyright and permission notice appear with all copies of the Data
+Files or Software, or (b) this copyright and permission notice appear in
+associated Documentation.
+
+THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
+KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
+THIRD PARTY RIGHTS.
+
+IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE
+BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES,
+OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THE DATA
+FILES OR SOFTWARE.
+
+Except as contained in this notice, the name of a copyright holder shall
+not be used in advertising or otherwise to promote the sale, use or other
+dealings in these Data Files or Software without prior written
+authorization of the copyright holder.
diff --git a/vendor/icu_list/README.md b/vendor/icu_list/README.md
index d17e8a8d7..a0b4680f2 100644
--- a/vendor/icu_list/README.md
+++ b/vendor/icu_list/README.md
@@ -1,5 +1,7 @@
# icu_list [![crates.io](https://img.shields.io/crates/v/icu_list)](https://crates.io/crates/icu_list)
+<!-- cargo-rdme start -->
+
Formatting lists in a locale-sensitive way.
This module is published as its own crate ([`icu_list`](https://docs.rs/icu_list/latest/icu_list/))
@@ -10,13 +12,11 @@ and as part of the [`icu`](https://docs.rs/icu/latest/icu/) crate. See the latte
### Formatting *and* lists in Spanish
```rust
-#
-let list_formatter = ListFormatter::try_new_and_with_length_unstable(
- &icu_testdata::unstable(),
+let list_formatter = ListFormatter::try_new_and_with_length(
&locale!("es").into(),
ListLength::Wide,
)
-.expect("Data should load successfully");
+.expect("locale should be present");
assert_writeable_eq!(
list_formatter.format(["España", "Suiza"].iter()),
@@ -33,13 +33,11 @@ assert_writeable_eq!(
### Formatting *or* lists in Thai
```rust
-#
-let list_formatter = ListFormatter::try_new_or_with_length_unstable(
- &icu_testdata::unstable(),
+let list_formatter = ListFormatter::try_new_or_with_length(
&locale!("th").into(),
ListLength::Short,
)
-.expect("Data should load successfully");
+.expect("locale should be present");
// We can use any Writeables as inputs
assert_writeable_eq!(list_formatter.format(1..=3), "1, 2 หรือ 3",);
@@ -48,13 +46,11 @@ assert_writeable_eq!(list_formatter.format(1..=3), "1, 2 หรือ 3",);
### Formatting unit lists in English
```rust
-#
-let list_formatter = ListFormatter::try_new_unit_with_length_unstable(
- &icu_testdata::unstable(),
+let list_formatter = ListFormatter::try_new_unit_with_length(
&locale!("en").into(),
ListLength::Wide,
)
-.expect("Data should load successfully");
+.expect("locale should be present");
assert_writeable_eq!(
list_formatter.format(["1ft", "2in"].iter()),
@@ -64,6 +60,8 @@ assert_writeable_eq!(
Note: this last example is not fully internationalized. See [icu4x/2192](https://github.com/unicode-org/icu4x/issues/2192)
for full unit handling.
+<!-- cargo-rdme end -->
+
## More Information
For more information on development, authorship, contributing etc. please visit [`ICU4X home page`](https://github.com/unicode-org/icu4x).
diff --git a/vendor/icu_list/examples/and_list.rs b/vendor/icu_list/examples/and_list.rs
index 08cfa3bda..355dda98e 100644
--- a/vendor/icu_list/examples/and_list.rs
+++ b/vendor/icu_list/examples/and_list.rs
@@ -13,12 +13,8 @@ use icu::locid::locale;
fn main(_argc: isize, _argv: *const *const u8) -> isize {
icu_benchmark_macros::main_setup!();
- let list_formatter = ListFormatter::try_new_and_with_length_unstable(
- &icu_testdata::unstable(),
- &locale!("es").into(),
- ListLength::Wide,
- )
- .unwrap();
+ let list_formatter =
+ ListFormatter::try_new_and_with_length(&locale!("es").into(), ListLength::Wide).unwrap();
println!(
"{}",
diff --git a/vendor/icu_list/src/lib.rs b/vendor/icu_list/src/lib.rs
index 9412a7fb9..931caf111 100644
--- a/vendor/icu_list/src/lib.rs
+++ b/vendor/icu_list/src/lib.rs
@@ -16,12 +16,11 @@
//! # use icu::locid::locale;
//! # use writeable::*;
//! #
-//! let list_formatter = ListFormatter::try_new_and_with_length_unstable(
-//! &icu_testdata::unstable(),
+//! let list_formatter = ListFormatter::try_new_and_with_length(
//! &locale!("es").into(),
//! ListLength::Wide,
//! )
-//! .expect("Data should load successfully");
+//! .expect("locale should be present");
//!
//! assert_writeable_eq!(
//! list_formatter.format(["España", "Suiza"].iter()),
@@ -42,12 +41,11 @@
//! # use icu::locid::locale;
//! # use writeable::*;
//! #
-//! let list_formatter = ListFormatter::try_new_or_with_length_unstable(
-//! &icu_testdata::unstable(),
+//! let list_formatter = ListFormatter::try_new_or_with_length(
//! &locale!("th").into(),
//! ListLength::Short,
//! )
-//! .expect("Data should load successfully");
+//! .expect("locale should be present");
//!
//! // We can use any Writeables as inputs
//! assert_writeable_eq!(list_formatter.format(1..=3), "1, 2 หรือ 3",);
@@ -60,12 +58,11 @@
//! # use icu::locid::locale;
//! # use writeable::*;
//! #
-//! let list_formatter = ListFormatter::try_new_unit_with_length_unstable(
-//! &icu_testdata::unstable(),
+//! let list_formatter = ListFormatter::try_new_unit_with_length(
//! &locale!("en").into(),
//! ListLength::Wide,
//! )
-//! .expect("Data should load successfully");
+//! .expect("locale should be present");
//!
//! assert_writeable_eq!(
//! list_formatter.format(["1ft", "2in"].iter()),
diff --git a/vendor/icu_list/src/list_formatter.rs b/vendor/icu_list/src/list_formatter.rs
index 5ef67c324..5ed635c2c 100644
--- a/vendor/icu_list/src/list_formatter.rs
+++ b/vendor/icu_list/src/list_formatter.rs
@@ -21,17 +21,35 @@ pub struct ListFormatter {
}
macro_rules! constructor {
- ($name: ident, $name_any: ident, $name_buffer: ident, $marker: ty, $doc: literal) => {
- #[doc = concat!("Creates a new [`ListFormatter`] that produces a ", $doc, "-type list.\n\nSee the [CLDR spec]",
- "(https://unicode.org/reports/tr35/tr35-general.html#ListPatterns) for an explanation of the different types.\n\n",
- "[📚 Help choosing a constructor](icu_provider::constructors)\n\n",
- "<div class=\"stab unstable\">⚠️ The bounds on this function may change over time, including in SemVer minor releases.</div>")]
- pub fn $name<D: DataProvider<$marker> + ?Sized>(
- data_provider: &D,
+ ($name: ident, $name_any: ident, $name_buffer: ident, $name_unstable: ident, $marker: ty, $doc: literal) => {
+ icu_provider::gen_any_buffer_data_constructors!(
+ locale: include,
+ style: ListLength,
+ error: ListError,
+ #[doc = concat!("Creates a new [`ListFormatter`] that produces a ", $doc, "-type list using compiled data.")]
+ ///
+ /// See the [CLDR spec](https://unicode.org/reports/tr35/tr35-general.html#ListPatterns) for
+ /// an explanation of the different types.
+ ///
+ /// ✨ *Enabled with the `compiled_data` Cargo feature.*
+ ///
+ /// [📚 Help choosing a constructor](icu_provider::constructors)
+ functions: [
+ $name,
+ $name_any,
+ $name_buffer,
+ $name_unstable,
+ Self
+ ]
+ );
+
+ #[doc = icu_provider::gen_any_buffer_unstable_docs!(UNSTABLE, Self::$name)]
+ pub fn $name_unstable(
+ provider: &(impl DataProvider<$marker> + ?Sized),
locale: &DataLocale,
length: ListLength,
) -> Result<Self, ListError> {
- let data = data_provider
+ let data = provider
.load(DataRequest {
locale,
metadata: Default::default(),
@@ -39,38 +57,31 @@ macro_rules! constructor {
.take_payload()?.cast();
Ok(Self { data, length })
}
- icu_provider::gen_any_buffer_constructors!(
- locale: include,
- style: ListLength,
- error: ListError,
- functions: [
- Self::$name,
- $name_any,
- $name_buffer
- ]
- );
};
}
impl ListFormatter {
constructor!(
- try_new_and_with_length_unstable,
+ try_new_and_with_length,
try_new_and_with_length_with_any_provider,
try_new_and_with_length_with_buffer_provider,
+ try_new_and_with_length_unstable,
AndListV1Marker,
"and"
);
constructor!(
- try_new_or_with_length_unstable,
+ try_new_or_with_length,
try_new_or_with_length_with_any_provider,
try_new_or_with_length_with_buffer_provider,
+ try_new_or_with_length_unstable,
OrListV1Marker,
"or"
);
constructor!(
- try_new_unit_with_length_unstable,
+ try_new_unit_with_length,
try_new_unit_with_length_with_any_provider,
try_new_unit_with_length_with_buffer_provider,
+ try_new_unit_with_length_unstable,
UnitListV1Marker,
"unit"
);
@@ -87,8 +98,7 @@ impl ListFormatter {
/// use icu::list::*;
/// # use icu::locid::locale;
/// # use writeable::*;
- /// let formatteur = ListFormatter::try_new_and_with_length_unstable(
- /// &icu_testdata::unstable(),
+ /// let formatteur = ListFormatter::try_new_and_with_length(
/// &locale!("fr").into(),
/// ListLength::Wide,
/// )
@@ -358,4 +368,68 @@ mod tests {
assert_writeable_eq!(formatter.format(["Beta", "Alpha"].iter()), "Beta :o Alpha");
}
+
+ macro_rules! test {
+ ($locale:literal, $type:ident, $(($input:expr, $output:literal),)+) => {
+ let f = ListFormatter::$type(
+ &icu::locid::locale!($locale).into(),
+ ListLength::Wide
+ ).unwrap();
+ $(
+ assert_writeable_eq!(f.format($input.iter()), $output);
+ )+
+ };
+ }
+
+ #[test]
+ fn test_basic() {
+ test!("fr", try_new_or_with_length, (["A", "B"], "A ou B"),);
+ }
+
+ #[test]
+ fn test_spanish() {
+ test!(
+ "es",
+ try_new_and_with_length,
+ (["x", "Mallorca"], "x y Mallorca"),
+ (["x", "Ibiza"], "x e Ibiza"),
+ (["x", "Hidalgo"], "x e Hidalgo"),
+ (["x", "Hierva"], "x y Hierva"),
+ );
+
+ test!(
+ "es",
+ try_new_or_with_length,
+ (["x", "Ibiza"], "x o Ibiza"),
+ (["x", "Okinawa"], "x u Okinawa"),
+ (["x", "8 más"], "x u 8 más"),
+ (["x", "8"], "x u 8"),
+ (["x", "87 más"], "x u 87 más"),
+ (["x", "87"], "x u 87"),
+ (["x", "11 más"], "x u 11 más"),
+ (["x", "11"], "x u 11"),
+ (["x", "110 más"], "x o 110 más"),
+ (["x", "110"], "x o 110"),
+ (["x", "11.000 más"], "x u 11.000 más"),
+ (["x", "11.000"], "x u 11.000"),
+ (["x", "11.000,92 más"], "x u 11.000,92 más"),
+ (["x", "11.000,92"], "x u 11.000,92"),
+ );
+
+ test!(
+ "es-AR",
+ try_new_and_with_length,
+ (["x", "Ibiza"], "x e Ibiza"),
+ );
+ }
+
+ #[test]
+ fn test_hebrew() {
+ test!(
+ "he",
+ try_new_and_with_length,
+ (["x", "יפו"], "x ויפו"),
+ (["x", "Ibiza"], "x ו‑Ibiza"),
+ );
+ }
}
diff --git a/vendor/icu_list/src/provider/mod.rs b/vendor/icu_list/src/provider/mod.rs
index 8438e956c..000234399 100644
--- a/vendor/icu_list/src/provider/mod.rs
+++ b/vendor/icu_list/src/provider/mod.rs
@@ -23,6 +23,29 @@ use icu_provider::DataMarker;
mod serde_dfa;
pub use serde_dfa::SerdeDFA;
+#[cfg(feature = "compiled_data")]
+#[derive(Debug)]
+/// Baked data
+///
+/// <div class="stab unstable">
+/// 🚧 This code is considered unstable; it may change at any time, in breaking or non-breaking ways,
+/// including in SemVer minor releases. In particular, the `DataProvider` implementations are only
+/// guaranteed to match with this version's `*_unstable` providers. Use with caution.
+/// </div>
+pub struct Baked;
+
+#[cfg(feature = "compiled_data")]
+const _: () = {
+ pub mod icu {
+ pub use crate as list;
+ pub use icu_locid_transform as locid_transform;
+ }
+ icu_list_data::make_provider!(Baked);
+ icu_list_data::impl_list_and_v1!(Baked);
+ icu_list_data::impl_list_or_v1!(Baked);
+ icu_list_data::impl_list_unit_v1!(Baked);
+};
+
/// Symbols and metadata required for [`ListFormatter`](crate::ListFormatter).
///
/// <div class="stab unstable">
@@ -35,7 +58,7 @@ pub use serde_dfa::SerdeDFA;
OrListV1Marker = "list/or@1",
UnitListV1Marker = "list/unit@1"
)]
-#[derive(Clone, Debug)]
+#[derive(Clone, Debug, PartialEq)]
#[cfg_attr(
feature = "datagen",
derive(serde::Serialize, databake::Bake),
@@ -103,10 +126,10 @@ impl<'data> ListFormatterPatternsV1<'data> {
/// including in SemVer minor releases. While the serde representation of data structs is guaranteed
/// to be stable, their Rust representation might not be. Use with caution.
/// </div>
-#[derive(Clone, Debug, yoke::Yokeable, zerofrom::ZeroFrom)]
+#[derive(Clone, Debug, PartialEq, yoke::Yokeable, zerofrom::ZeroFrom)]
#[cfg_attr(
feature = "datagen",
- derive(PartialEq, serde::Serialize, databake::Bake),
+ derive(serde::Serialize, databake::Bake),
databake(path = icu_list::provider),
)]
#[cfg_attr(feature = "serde", derive(serde::Deserialize))]
@@ -129,10 +152,10 @@ pub struct ConditionalListJoinerPattern<'data> {
/// including in SemVer minor releases. While the serde representation of data structs is guaranteed
/// to be stable, their Rust representation might not be. Use with caution.
/// </div>
-#[derive(Clone, Debug, yoke::Yokeable, zerofrom::ZeroFrom)]
+#[derive(Clone, Debug, PartialEq, yoke::Yokeable, zerofrom::ZeroFrom)]
#[cfg_attr(
feature = "datagen",
- derive(PartialEq, serde::Serialize, databake::Bake),
+ derive(serde::Serialize, databake::Bake),
databake(path = icu_list::provider),
)]
pub struct SpecialCasePattern<'data> {
@@ -245,7 +268,7 @@ impl databake::Bake for ListJoinerPattern<'_> {
let string = (&*self.string).bake(env);
let index_1 = self.index_1.bake(env);
databake::quote! {
- ::icu_list::provider::ListJoinerPattern::from_parts(#string, #index_1)
+ icu_list::provider::ListJoinerPattern::from_parts(#string, #index_1)
}
}
}
diff --git a/vendor/icu_list/src/provider/serde_dfa.rs b/vendor/icu_list/src/provider/serde_dfa.rs
index 9be85fb18..4cde60d46 100644
--- a/vendor/icu_list/src/provider/serde_dfa.rs
+++ b/vendor/icu_list/src/provider/serde_dfa.rs
@@ -22,7 +22,6 @@ pub struct SerdeDFA<'data> {
pattern: Option<Cow<'data, str>>,
}
-#[cfg(feature = "datagen")]
impl PartialEq for SerdeDFA<'_> {
fn eq(&self, other: &Self) -> bool {
self.dfa_bytes == other.dfa_bytes
@@ -38,7 +37,7 @@ impl databake::Bake for SerdeDFA<'_> {
// Safe because of `to_bytes_little_endian`/`to_bytes_big_endian`'s invariant.
databake::quote! {
unsafe {
- ::icu_list::provider::SerdeDFA::from_dfa_bytes_unchecked(
+ icu_list::provider::SerdeDFA::from_dfa_bytes_unchecked(
if cfg!(target_endian = "little") {
#le_bytes
} else {