about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorManish Goregaokar <manishsmail@gmail.com>2022-11-18 17:48:17 -0500
committerGitHub <noreply@github.com>2022-11-18 17:48:17 -0500
commit3181006d83ae9a7c64e8d83693b87259974f0bfd (patch)
tree5170e8c046e01e6fac78bdcd289469919c4869b2 /src
parent19efa2599c1d661816c17fcb8e52776748ddc72a (diff)
parent2721e407373711d59906dd5114bb14bf405c2e9e (diff)
Rollup merge of #104047 - crlf0710:icu_based_list_formatting, r=davidtwco
Diagnostics `icu4x` based list formatting.

This adds a new kind of `DiagnosticArg` and add the ability to convert it to a `FluentValue::Custom`. When emitting fluent output, it makes use of `ListFormatter` from `icu4x` project to convert it to localized version of list following the fluent locale, as a kind of eager translation.

Tested locally with locales like `en`, `ja`, etc, and they work fine. <del>Though neither `zh-CN` nor `zh-Hans` works correctly, it seems they fallback to `und` locale somehow, emitting only comma-based list. I believe this is an internal issue of `icu4x` itself.</del>(Works fine after https://github.com/rust-lang/rust/pull/104047#issuecomment-1304860940)

Would love to hear what others think.

r? `@davidtwco`
cc `@Manishearth`
Diffstat (limited to 'src')
-rw-r--r--src/tools/tidy/src/deps.rs13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/tools/tidy/src/deps.rs b/src/tools/tidy/src/deps.rs
index f1f5a194157..8155ec9dd27 100644
--- a/src/tools/tidy/src/deps.rs
+++ b/src/tools/tidy/src/deps.rs
@@ -133,6 +133,11 @@ const PERMITTED_RUSTC_DEPENDENCIES: &[&str] = &[
     "hashbrown",
     "hermit-abi",
     "humantime",
+    "icu_list",
+    "icu_locid",
+    "icu_provider",
+    "icu_provider_adapters",
+    "icu_provider_macros",
     "if_chain",
     "indexmap",
     "instant",
@@ -145,6 +150,7 @@ const PERMITTED_RUSTC_DEPENDENCIES: &[&str] = &[
     "libc",
     "libloading",
     "libz-sys",
+    "litemap",
     "lock_api",
     "log",
     "matchers",
@@ -253,9 +259,16 @@ const PERMITTED_RUSTC_DEPENDENCIES: &[&str] = &[
     "winapi-i686-pc-windows-gnu",
     "winapi-util",
     "winapi-x86_64-pc-windows-gnu",
+    "writeable",
     // this is a false-positive: it's only used by rustfmt, but because it's enabled through a
     // feature, tidy thinks it's used by rustc as well.
     "yansi-term",
+    "yoke",
+    "yoke-derive",
+    "zerofrom",
+    "zerofrom-derive",
+    "zerovec",
+    "zerovec-derive",
 ];
 
 const PERMITTED_CRANELIFT_DEPENDENCIES: &[&str] = &[