diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 00:47:55 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 00:47:55 +0000 |
commit | 26a029d407be480d791972afb5975cf62c9360a6 (patch) | |
tree | f435a8308119effd964b339f76abb83a57c29483 /intl/icu4x-patches | |
parent | Initial commit. (diff) | |
download | firefox-26a029d407be480d791972afb5975cf62c9360a6.tar.xz firefox-26a029d407be480d791972afb5975cf62c9360a6.zip |
Adding upstream version 124.0.1.upstream/124.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'intl/icu4x-patches')
-rw-r--r-- | intl/icu4x-patches/001-Cargo.toml.patch | 22 | ||||
-rw-r--r-- | intl/icu4x-patches/002-GH4109.patch | 89 | ||||
-rw-r--r-- | intl/icu4x-patches/003-explicit.patch | 242 | ||||
-rw-r--r-- | intl/icu4x-patches/004-dead-code.patch | 13 | ||||
-rw-r--r-- | intl/icu4x-patches/README | 19 | ||||
-rw-r--r-- | intl/icu4x-patches/empty.toml | 1 |
6 files changed, 386 insertions, 0 deletions
diff --git a/intl/icu4x-patches/001-Cargo.toml.patch b/intl/icu4x-patches/001-Cargo.toml.patch new file mode 100644 index 0000000000..683c289ea1 --- /dev/null +++ b/intl/icu4x-patches/001-Cargo.toml.patch @@ -0,0 +1,22 @@ +--- a/intl/icu_capi/Cargo.toml 2023-11-23 00:55:29.801649858 +0900 ++++ b/intl/icu_capi/Cargo.toml 2023-11-23 00:57:49.528753911 +0900 +@@ -190,19 +190,7 @@ + "icu_timezone?/serde", + ] + compiled_data = [ +- "icu_calendar?/compiled_data", +- "icu_casemap?/compiled_data", +- "icu_collator?/compiled_data", +- "icu_datetime?/compiled_data", +- "icu_decimal?/compiled_data", +- "icu_displaynames?/compiled_data", +- "icu_list?/compiled_data", +- "icu_locid_transform?/compiled_data", +- "icu_normalizer?/compiled_data", +- "icu_plurals?/compiled_data", +- "icu_properties?/compiled_data", + "icu_segmenter?/compiled_data", +- "icu_timezone?/compiled_data", + ] + cpp_default = ["logging"] + default = [ diff --git a/intl/icu4x-patches/002-GH4109.patch b/intl/icu4x-patches/002-GH4109.patch new file mode 100644 index 0000000000..10cadec3ca --- /dev/null +++ b/intl/icu4x-patches/002-GH4109.patch @@ -0,0 +1,89 @@ +diff --git a/intl/icu_capi/cpp/include/diplomat_runtime.hpp b/intl/icu_capi/cpp/include/diplomat_runtime.hpp +--- a/intl/icu_capi/cpp/include/diplomat_runtime.hpp ++++ b/intl/icu_capi/cpp/include/diplomat_runtime.hpp +@@ -49,52 +49,60 @@ template<typename T> struct WriteableTra + template<> struct WriteableTrait<std::string> { + static inline capi::DiplomatWriteable Construct(std::string& t) { + return diplomat::WriteableFromString(t); + } + }; + + template<class T> struct Ok { + T inner; +- Ok(T&& i): inner(std::move(i)) {} ++ explicit Ok(T&& i): inner(std::move(i)) {} + // We don't want to expose an lvalue-capable constructor in general + // however there is no problem doing this for trivially copyable types + template<typename X = T, typename = typename std::enable_if<std::is_trivially_copyable<X>::value>::type> +- Ok(T i): inner(i) {} ++ explicit Ok(const T& i): inner(i) {} + Ok() = default; + Ok(Ok&&) noexcept = default; + Ok(const Ok &) = default; + Ok& operator=(const Ok&) = default; + Ok& operator=(Ok&&) noexcept = default; + }; + + template<class T> struct Err { + T inner; +- Err(T&& i): inner(std::move(i)) {} ++ explicit Err(T&& i): inner(std::move(i)) {} + // We don't want to expose an lvalue-capable constructor in general + // however there is no problem doing this for trivially copyable types + template<typename X = T, typename = typename std::enable_if<std::is_trivially_copyable<X>::value>::type> +- Err(T i): inner(i) {} ++ explicit Err(const T& i): inner(i) {} + Err() = default; + Err(Err&&) noexcept = default; + Err(const Err &) = default; + Err& operator=(const Err&) = default; + Err& operator=(Err&&) noexcept = default; + }; + + template<class T, class E> + class result { + private: + std::variant<Ok<T>, Err<E>> val; + public: +- result(Ok<T>&& v): val(std::move(v)) {} +- result(Err<E>&& v): val(std::move(v)) {} ++ explicit result(Ok<T>&& v): val(std::move(v)) {} ++ explicit result(Err<E>&& v): val(std::move(v)) {} + result() = default; + result(const result &) = default; + result& operator=(const result&) = default; ++ result& operator=(Ok<T>&& t) { ++ this->val = Ok<T>(std::move(t)); ++ return *this; ++ } ++ result& operator=(Err<E>&& e) { ++ this->val = Err<E>(std::move(e)); ++ return *this; ++ } + result& operator=(result&&) noexcept = default; + result(result &&) noexcept = default; + ~result() = default; + bool is_ok() const { + return std::holds_alternative<Ok<T>>(this->val); + }; + bool is_err() const { + return std::holds_alternative<Err<E>>(this->val); +@@ -142,17 +150,17 @@ template<class T> using span = std::span + // C++-17-compatible std::span + template<class T> + class span { + + public: + constexpr span(T* data, size_t size) + : data_(data), size_(size) {} + template<size_t N> +- constexpr span(std::array<typename std::remove_const<T>::type, N>& arr) ++ explicit constexpr span(std::array<typename std::remove_const<T>::type, N>& arr) + : data_(const_cast<T*>(arr.data())), size_(N) {} + constexpr T* data() const noexcept { + return this->data_; + } + constexpr size_t size() const noexcept { + return this->size_; + } + private: diff --git a/intl/icu4x-patches/003-explicit.patch b/intl/icu4x-patches/003-explicit.patch new file mode 100644 index 0000000000..3b89ff36e4 --- /dev/null +++ b/intl/icu4x-patches/003-explicit.patch @@ -0,0 +1,242 @@ +diff --git a/intl/icu_capi/cpp/include/ICU4XDataProvider.hpp b/intl/icu_capi/cpp/include/ICU4XDataProvider.hpp +--- a/intl/icu_capi/cpp/include/ICU4XDataProvider.hpp ++++ b/intl/icu_capi/cpp/include/ICU4XDataProvider.hpp +@@ -109,17 +109,17 @@ class ICU4XDataProvider { + /** + * See the [Rust documentation for `new_with_fallbacker`](https://docs.rs/icu_provider_adapters/latest/icu_provider_adapters/fallback/struct.LocaleFallbackProvider.html#method.new_with_fallbacker) for more information. + * + * Additional information: [1](https://docs.rs/icu_provider_adapters/latest/icu_provider_adapters/fallback/struct.LocaleFallbackProvider.html) + */ + diplomat::result<std::monostate, ICU4XError> enable_locale_fallback_with(const ICU4XLocaleFallbacker& fallbacker); + inline const capi::ICU4XDataProvider* AsFFI() const { return this->inner.get(); } + inline capi::ICU4XDataProvider* AsFFIMut() { return this->inner.get(); } +- inline ICU4XDataProvider(capi::ICU4XDataProvider* i) : inner(i) {} ++ inline explicit ICU4XDataProvider(capi::ICU4XDataProvider* i) : inner(i) {} + ICU4XDataProvider() = default; + ICU4XDataProvider(ICU4XDataProvider&&) noexcept = default; + ICU4XDataProvider& operator=(ICU4XDataProvider&& other) noexcept = default; + private: + std::unique_ptr<capi::ICU4XDataProvider, ICU4XDataProviderDeleter> inner; + }; + + #include "ICU4XLocaleFallbacker.hpp" +diff --git a/intl/icu_capi/cpp/include/ICU4XLineBreakIteratorLatin1.hpp b/intl/icu_capi/cpp/include/ICU4XLineBreakIteratorLatin1.hpp +--- a/intl/icu_capi/cpp/include/ICU4XLineBreakIteratorLatin1.hpp ++++ b/intl/icu_capi/cpp/include/ICU4XLineBreakIteratorLatin1.hpp +@@ -33,17 +33,17 @@ class ICU4XLineBreakIteratorLatin1 { + * Finds the next breakpoint. Returns -1 if at the end of the string or if the index is + * out of range of a 32-bit signed integer. + * + * See the [Rust documentation for `next`](https://docs.rs/icu/latest/icu/segmenter/struct.LineBreakIterator.html#method.next) for more information. + */ + int32_t next(); + inline const capi::ICU4XLineBreakIteratorLatin1* AsFFI() const { return this->inner.get(); } + inline capi::ICU4XLineBreakIteratorLatin1* AsFFIMut() { return this->inner.get(); } +- inline ICU4XLineBreakIteratorLatin1(capi::ICU4XLineBreakIteratorLatin1* i) : inner(i) {} ++ inline explicit ICU4XLineBreakIteratorLatin1(capi::ICU4XLineBreakIteratorLatin1* i) : inner(i) {} + ICU4XLineBreakIteratorLatin1() = default; + ICU4XLineBreakIteratorLatin1(ICU4XLineBreakIteratorLatin1&&) noexcept = default; + ICU4XLineBreakIteratorLatin1& operator=(ICU4XLineBreakIteratorLatin1&& other) noexcept = default; + private: + std::unique_ptr<capi::ICU4XLineBreakIteratorLatin1, ICU4XLineBreakIteratorLatin1Deleter> inner; + }; + + +diff --git a/intl/icu_capi/cpp/include/ICU4XLineBreakIteratorUtf16.hpp b/intl/icu_capi/cpp/include/ICU4XLineBreakIteratorUtf16.hpp +--- a/intl/icu_capi/cpp/include/ICU4XLineBreakIteratorUtf16.hpp ++++ b/intl/icu_capi/cpp/include/ICU4XLineBreakIteratorUtf16.hpp +@@ -33,17 +33,17 @@ class ICU4XLineBreakIteratorUtf16 { + * Finds the next breakpoint. Returns -1 if at the end of the string or if the index is + * out of range of a 32-bit signed integer. + * + * See the [Rust documentation for `next`](https://docs.rs/icu/latest/icu/segmenter/struct.LineBreakIterator.html#method.next) for more information. + */ + int32_t next(); + inline const capi::ICU4XLineBreakIteratorUtf16* AsFFI() const { return this->inner.get(); } + inline capi::ICU4XLineBreakIteratorUtf16* AsFFIMut() { return this->inner.get(); } +- inline ICU4XLineBreakIteratorUtf16(capi::ICU4XLineBreakIteratorUtf16* i) : inner(i) {} ++ inline explicit ICU4XLineBreakIteratorUtf16(capi::ICU4XLineBreakIteratorUtf16* i) : inner(i) {} + ICU4XLineBreakIteratorUtf16() = default; + ICU4XLineBreakIteratorUtf16(ICU4XLineBreakIteratorUtf16&&) noexcept = default; + ICU4XLineBreakIteratorUtf16& operator=(ICU4XLineBreakIteratorUtf16&& other) noexcept = default; + private: + std::unique_ptr<capi::ICU4XLineBreakIteratorUtf16, ICU4XLineBreakIteratorUtf16Deleter> inner; + }; + + +diff --git a/intl/icu_capi/cpp/include/ICU4XLocale.hpp b/intl/icu_capi/cpp/include/ICU4XLocale.hpp +--- a/intl/icu_capi/cpp/include/ICU4XLocale.hpp ++++ b/intl/icu_capi/cpp/include/ICU4XLocale.hpp +@@ -202,17 +202,17 @@ class ICU4XLocale { + /** + * Deprecated + * + * Use `create_from_string("bn"). + */ + static ICU4XLocale create_bn(); + inline const capi::ICU4XLocale* AsFFI() const { return this->inner.get(); } + inline capi::ICU4XLocale* AsFFIMut() { return this->inner.get(); } +- inline ICU4XLocale(capi::ICU4XLocale* i) : inner(i) {} ++ inline explicit ICU4XLocale(capi::ICU4XLocale* i) : inner(i) {} + ICU4XLocale() = default; + ICU4XLocale(ICU4XLocale&&) noexcept = default; + ICU4XLocale& operator=(ICU4XLocale&& other) noexcept = default; + private: + std::unique_ptr<capi::ICU4XLocale, ICU4XLocaleDeleter> inner; + }; + + +diff --git a/intl/icu_capi/cpp/include/ICU4XLocaleFallbackIterator.hpp b/intl/icu_capi/cpp/include/ICU4XLocaleFallbackIterator.hpp +--- a/intl/icu_capi/cpp/include/ICU4XLocaleFallbackIterator.hpp ++++ b/intl/icu_capi/cpp/include/ICU4XLocaleFallbackIterator.hpp +@@ -40,17 +40,17 @@ class ICU4XLocaleFallbackIterator { + /** + * Performs one step of the fallback algorithm, mutating the locale. + * + * See the [Rust documentation for `step`](https://docs.rs/icu/latest/icu/locid_transform/fallback/struct.LocaleFallbackIterator.html#method.step) for more information. + */ + void step(); + inline const capi::ICU4XLocaleFallbackIterator* AsFFI() const { return this->inner.get(); } + inline capi::ICU4XLocaleFallbackIterator* AsFFIMut() { return this->inner.get(); } +- inline ICU4XLocaleFallbackIterator(capi::ICU4XLocaleFallbackIterator* i) : inner(i) {} ++ inline explicit ICU4XLocaleFallbackIterator(capi::ICU4XLocaleFallbackIterator* i) : inner(i) {} + ICU4XLocaleFallbackIterator() = default; + ICU4XLocaleFallbackIterator(ICU4XLocaleFallbackIterator&&) noexcept = default; + ICU4XLocaleFallbackIterator& operator=(ICU4XLocaleFallbackIterator&& other) noexcept = default; + private: + std::unique_ptr<capi::ICU4XLocaleFallbackIterator, ICU4XLocaleFallbackIteratorDeleter> inner; + }; + + #include "ICU4XLocale.hpp" +diff --git a/intl/icu_capi/cpp/include/ICU4XLocaleFallbacker.hpp b/intl/icu_capi/cpp/include/ICU4XLocaleFallbacker.hpp +--- a/intl/icu_capi/cpp/include/ICU4XLocaleFallbacker.hpp ++++ b/intl/icu_capi/cpp/include/ICU4XLocaleFallbacker.hpp +@@ -53,17 +53,17 @@ class ICU4XLocaleFallbacker { + * + * See the [Rust documentation for `for_config`](https://docs.rs/icu/latest/icu/locid_transform/fallback/struct.LocaleFallbacker.html#method.for_config) for more information. + * + * Lifetimes: `this` must live at least as long as the output. + */ + diplomat::result<ICU4XLocaleFallbackerWithConfig, ICU4XError> for_config(ICU4XLocaleFallbackConfig config) const; + inline const capi::ICU4XLocaleFallbacker* AsFFI() const { return this->inner.get(); } + inline capi::ICU4XLocaleFallbacker* AsFFIMut() { return this->inner.get(); } +- inline ICU4XLocaleFallbacker(capi::ICU4XLocaleFallbacker* i) : inner(i) {} ++ inline explicit ICU4XLocaleFallbacker(capi::ICU4XLocaleFallbacker* i) : inner(i) {} + ICU4XLocaleFallbacker() = default; + ICU4XLocaleFallbacker(ICU4XLocaleFallbacker&&) noexcept = default; + ICU4XLocaleFallbacker& operator=(ICU4XLocaleFallbacker&& other) noexcept = default; + private: + std::unique_ptr<capi::ICU4XLocaleFallbacker, ICU4XLocaleFallbackerDeleter> inner; + }; + + #include "ICU4XDataProvider.hpp" +diff --git a/intl/icu_capi/cpp/include/ICU4XLocaleFallbackerWithConfig.hpp b/intl/icu_capi/cpp/include/ICU4XLocaleFallbackerWithConfig.hpp +--- a/intl/icu_capi/cpp/include/ICU4XLocaleFallbackerWithConfig.hpp ++++ b/intl/icu_capi/cpp/include/ICU4XLocaleFallbackerWithConfig.hpp +@@ -38,17 +38,17 @@ class ICU4XLocaleFallbackerWithConfig { + * + * See the [Rust documentation for `fallback_for`](https://docs.rs/icu/latest/icu/locid_transform/fallback/struct.LocaleFallbacker.html#method.fallback_for) for more information. + * + * Lifetimes: `this` must live at least as long as the output. + */ + ICU4XLocaleFallbackIterator fallback_for_locale(const ICU4XLocale& locale) const; + inline const capi::ICU4XLocaleFallbackerWithConfig* AsFFI() const { return this->inner.get(); } + inline capi::ICU4XLocaleFallbackerWithConfig* AsFFIMut() { return this->inner.get(); } +- inline ICU4XLocaleFallbackerWithConfig(capi::ICU4XLocaleFallbackerWithConfig* i) : inner(i) {} ++ inline explicit ICU4XLocaleFallbackerWithConfig(capi::ICU4XLocaleFallbackerWithConfig* i) : inner(i) {} + ICU4XLocaleFallbackerWithConfig() = default; + ICU4XLocaleFallbackerWithConfig(ICU4XLocaleFallbackerWithConfig&&) noexcept = default; + ICU4XLocaleFallbackerWithConfig& operator=(ICU4XLocaleFallbackerWithConfig&& other) noexcept = default; + private: + std::unique_ptr<capi::ICU4XLocaleFallbackerWithConfig, ICU4XLocaleFallbackerWithConfigDeleter> inner; + }; + + #include "ICU4XLocale.hpp" +diff --git a/intl/icu_capi/cpp/include/ICU4XWordBreakIteratorLatin1.hpp b/intl/icu_capi/cpp/include/ICU4XWordBreakIteratorLatin1.hpp +--- a/intl/icu_capi/cpp/include/ICU4XWordBreakIteratorLatin1.hpp ++++ b/intl/icu_capi/cpp/include/ICU4XWordBreakIteratorLatin1.hpp +@@ -46,17 +46,17 @@ class ICU4XWordBreakIteratorLatin1 { + /** + * Return true when break boundary is word-like such as letter/number/CJK + * + * See the [Rust documentation for `is_word_like`](https://docs.rs/icu/latest/icu/segmenter/struct.WordBreakIterator.html#method.is_word_like) for more information. + */ + bool is_word_like() const; + inline const capi::ICU4XWordBreakIteratorLatin1* AsFFI() const { return this->inner.get(); } + inline capi::ICU4XWordBreakIteratorLatin1* AsFFIMut() { return this->inner.get(); } +- inline ICU4XWordBreakIteratorLatin1(capi::ICU4XWordBreakIteratorLatin1* i) : inner(i) {} ++ inline explicit ICU4XWordBreakIteratorLatin1(capi::ICU4XWordBreakIteratorLatin1* i) : inner(i) {} + ICU4XWordBreakIteratorLatin1() = default; + ICU4XWordBreakIteratorLatin1(ICU4XWordBreakIteratorLatin1&&) noexcept = default; + ICU4XWordBreakIteratorLatin1& operator=(ICU4XWordBreakIteratorLatin1&& other) noexcept = default; + private: + std::unique_ptr<capi::ICU4XWordBreakIteratorLatin1, ICU4XWordBreakIteratorLatin1Deleter> inner; + }; + + +diff --git a/intl/icu_capi/cpp/include/ICU4XWordBreakIteratorUtf16.hpp b/intl/icu_capi/cpp/include/ICU4XWordBreakIteratorUtf16.hpp +--- a/intl/icu_capi/cpp/include/ICU4XWordBreakIteratorUtf16.hpp ++++ b/intl/icu_capi/cpp/include/ICU4XWordBreakIteratorUtf16.hpp +@@ -46,17 +46,17 @@ class ICU4XWordBreakIteratorUtf16 { + /** + * Return true when break boundary is word-like such as letter/number/CJK + * + * See the [Rust documentation for `is_word_like`](https://docs.rs/icu/latest/icu/segmenter/struct.WordBreakIterator.html#method.is_word_like) for more information. + */ + bool is_word_like() const; + inline const capi::ICU4XWordBreakIteratorUtf16* AsFFI() const { return this->inner.get(); } + inline capi::ICU4XWordBreakIteratorUtf16* AsFFIMut() { return this->inner.get(); } +- inline ICU4XWordBreakIteratorUtf16(capi::ICU4XWordBreakIteratorUtf16* i) : inner(i) {} ++ inline explicit ICU4XWordBreakIteratorUtf16(capi::ICU4XWordBreakIteratorUtf16* i) : inner(i) {} + ICU4XWordBreakIteratorUtf16() = default; + ICU4XWordBreakIteratorUtf16(ICU4XWordBreakIteratorUtf16&&) noexcept = default; + ICU4XWordBreakIteratorUtf16& operator=(ICU4XWordBreakIteratorUtf16&& other) noexcept = default; + private: + std::unique_ptr<capi::ICU4XWordBreakIteratorUtf16, ICU4XWordBreakIteratorUtf16Deleter> inner; + }; + + +diff --git a/intl/icu_capi/cpp/include/ICU4XWordBreakIteratorUtf8.hpp b/intl/icu_capi/cpp/include/ICU4XWordBreakIteratorUtf8.hpp +--- a/intl/icu_capi/cpp/include/ICU4XWordBreakIteratorUtf8.hpp ++++ b/intl/icu_capi/cpp/include/ICU4XWordBreakIteratorUtf8.hpp +@@ -46,17 +46,17 @@ class ICU4XWordBreakIteratorUtf8 { + /** + * Return true when break boundary is word-like such as letter/number/CJK + * + * See the [Rust documentation for `is_word_like`](https://docs.rs/icu/latest/icu/segmenter/struct.WordBreakIterator.html#method.is_word_like) for more information. + */ + bool is_word_like() const; + inline const capi::ICU4XWordBreakIteratorUtf8* AsFFI() const { return this->inner.get(); } + inline capi::ICU4XWordBreakIteratorUtf8* AsFFIMut() { return this->inner.get(); } +- inline ICU4XWordBreakIteratorUtf8(capi::ICU4XWordBreakIteratorUtf8* i) : inner(i) {} ++ inline explicit ICU4XWordBreakIteratorUtf8(capi::ICU4XWordBreakIteratorUtf8* i) : inner(i) {} + ICU4XWordBreakIteratorUtf8() = default; + ICU4XWordBreakIteratorUtf8(ICU4XWordBreakIteratorUtf8&&) noexcept = default; + ICU4XWordBreakIteratorUtf8& operator=(ICU4XWordBreakIteratorUtf8&& other) noexcept = default; + private: + std::unique_ptr<capi::ICU4XWordBreakIteratorUtf8, ICU4XWordBreakIteratorUtf8Deleter> inner; + }; + + +diff --git a/intl/icu_capi/cpp/include/ICU4XWordSegmenter.hpp b/intl/icu_capi/cpp/include/ICU4XWordSegmenter.hpp +--- a/intl/icu_capi/cpp/include/ICU4XWordSegmenter.hpp ++++ b/intl/icu_capi/cpp/include/ICU4XWordSegmenter.hpp +@@ -88,17 +88,17 @@ class ICU4XWordSegmenter { + * + * See the [Rust documentation for `segment_latin1`](https://docs.rs/icu/latest/icu/segmenter/struct.WordSegmenter.html#method.segment_latin1) for more information. + * + * Lifetimes: `this`, `input` must live at least as long as the output. + */ + ICU4XWordBreakIteratorLatin1 segment_latin1(const diplomat::span<const uint8_t> input) const; + inline const capi::ICU4XWordSegmenter* AsFFI() const { return this->inner.get(); } + inline capi::ICU4XWordSegmenter* AsFFIMut() { return this->inner.get(); } +- inline ICU4XWordSegmenter(capi::ICU4XWordSegmenter* i) : inner(i) {} ++ inline explicit ICU4XWordSegmenter(capi::ICU4XWordSegmenter* i) : inner(i) {} + ICU4XWordSegmenter() = default; + ICU4XWordSegmenter(ICU4XWordSegmenter&&) noexcept = default; + ICU4XWordSegmenter& operator=(ICU4XWordSegmenter&& other) noexcept = default; + private: + std::unique_ptr<capi::ICU4XWordSegmenter, ICU4XWordSegmenterDeleter> inner; + }; + + #include "ICU4XDataProvider.hpp" diff --git a/intl/icu4x-patches/004-dead-code.patch b/intl/icu4x-patches/004-dead-code.patch new file mode 100644 index 0000000000..f3fcbbb286 --- /dev/null +++ b/intl/icu4x-patches/004-dead-code.patch @@ -0,0 +1,13 @@ +diff --git a/intl/icu_capi/src/data_struct.rs b/intl/icu_capi/src/data_struct.rs +index d66e20b117b58..60765cec2419a 100644 +--- a/intl/icu_capi/src/data_struct.rs ++++ b/intl/icu_capi/src/data_struct.rs +@@ -20,7 +20,7 @@ pub mod ffi { + /// + /// This can be used to construct a StructDataProvider. + #[diplomat::attr(dart, disable)] +- pub struct ICU4XDataStruct(pub(crate) AnyPayload); ++ pub struct ICU4XDataStruct(#[allow(dead_code)] AnyPayload); + + impl ICU4XDataStruct { + /// Construct a new DecimalSymbolsV1 data struct. diff --git a/intl/icu4x-patches/README b/intl/icu4x-patches/README new file mode 100644 index 0000000000..1f56bae779 --- /dev/null +++ b/intl/icu4x-patches/README @@ -0,0 +1,19 @@ +### 001-Cargo.toml.patch + +A patch for Cargo.toml of icu_capi. Remove weak dependencies of unnecessary crates. + +### 002-GH4109.patch + +A patch for icu_capi for clang and static analysis. + +### 003-explicit.patch + +A patch for icu_capi to add explicit keyword + +### 004-dead-code.patch + +A patch for icu_capi to mark the ICU4XDataStruct as dead code as it's never read from Rust. + +### empty.toml + +Empty toml data for trie_data for icu_segmenter_data. diff --git a/intl/icu4x-patches/empty.toml b/intl/icu4x-patches/empty.toml new file mode 100644 index 0000000000..bcf8db395c --- /dev/null +++ b/intl/icu4x-patches/empty.toml @@ -0,0 +1 @@ +trie_data = [0] |