Skip to content

Commit 9b075f6

Browse files
authored
Update Diplomat to new opaque_mut annotations (#7703)
rust-diplomat/diplomat#1065 made Diplomat start enforcing `opaque_mut`. Diplomat doesn't use this to check anything yet, but it's step 1 of the process in making FFI sound.
1 parent 84bab65 commit 9b075f6

19 files changed

+38
-38
lines changed

Cargo.lock

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -213,10 +213,10 @@ icu_benchmark_macros = { path = "tools/benchmark/macros" }
213213

214214
# The version here can either be a `version = ".."` spec or `git = "https://github.com/rust-diplomat/diplomat", rev = ".."`
215215
# Diplomat must be published preceding a new ICU4X release but may use git versions in between
216-
diplomat = { git = "https://github.com/rust-diplomat/diplomat", rev = "f71e1b6c562237f9e6059dbf54bfce626936dd35", default-features = false }
217-
diplomat-runtime = { git = "https://github.com/rust-diplomat/diplomat", rev = "f71e1b6c562237f9e6059dbf54bfce626936dd35", default-features = false }
218-
diplomat_core = { git = "https://github.com/rust-diplomat/diplomat", rev = "f71e1b6c562237f9e6059dbf54bfce626936dd35", default-features = false }
219-
diplomat-tool = { git = "https://github.com/rust-diplomat/diplomat", rev = "f71e1b6c562237f9e6059dbf54bfce626936dd35" }
216+
diplomat = { git = "https://github.com/rust-diplomat/diplomat", rev = "c10e39694cae1026c906111fa2c6c791d7cc6935", default-features = false }
217+
diplomat-runtime = { git = "https://github.com/rust-diplomat/diplomat", rev = "c10e39694cae1026c906111fa2c6c791d7cc6935", default-features = false }
218+
diplomat_core = { git = "https://github.com/rust-diplomat/diplomat", rev = "c10e39694cae1026c906111fa2c6c791d7cc6935", default-features = false }
219+
diplomat-tool = { git = "https://github.com/rust-diplomat/diplomat", rev = "c10e39694cae1026c906111fa2c6c791d7cc6935" }
220220

221221
# EXTERNAL DEPENDENCIES
222222
#

ffi/capi/bindings/c/TimeZoneInfo.h

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ffi/capi/bindings/cpp/icu4x/TimeZoneInfo.d.hpp

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ffi/capi/bindings/cpp/icu4x/TimeZoneInfo.hpp

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ffi/capi/src/bidi.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ pub mod ffi {
229229
}
230230

231231
/// Bidi information for a single processed paragraph
232-
#[diplomat::opaque]
232+
#[diplomat::opaque_mut]
233233
#[diplomat::attr(demo_gen, disable)] // TODO needs custom page
234234
pub struct BidiParagraph<'info>(pub unicode_bidi::Paragraph<'info, 'info>);
235235

ffi/capi/src/collections_sets.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ pub mod ffi {
99

1010
use crate::unstable::properties_sets::ffi::CodePointSetData;
1111

12-
#[diplomat::opaque]
12+
#[diplomat::opaque_mut]
1313
#[diplomat::rust_link(
1414
icu::collections::codepointinvlist::CodePointInversionListBuilder,
1515
Struct

ffi/capi/src/fallbacker.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ pub mod ffi {
5353
);
5454

5555
/// An iterator over the locale under fallback.
56-
#[diplomat::opaque]
56+
#[diplomat::opaque_mut]
5757
#[diplomat::rust_link(icu::locale::fallback::LocaleFallbackIterator, Struct)]
5858
pub struct LocaleFallbackIterator<'a>(pub icu_locale::fallback::LocaleFallbackIterator<'a>);
5959

ffi/capi/src/fixed_decimal.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ pub mod ffi {
1313

1414
use writeable::Writeable;
1515

16-
#[diplomat::opaque]
16+
#[diplomat::opaque_mut]
1717
#[diplomat::rust_link(fixed_decimal::Decimal, Typedef)]
1818
pub struct Decimal(pub fixed_decimal::Decimal);
1919

ffi/capi/src/iana_parser.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ pub mod ffi {
5959
}
6060
}
6161

62-
#[diplomat::opaque]
62+
#[diplomat::opaque_mut]
6363
#[diplomat::rust_link(icu::time::zone::iana::TimeZoneIter, Struct)]
6464
pub struct TimeZoneIterator<'a>(icu_time::zone::iana::TimeZoneIter<'a>);
6565

@@ -160,7 +160,7 @@ pub mod ffi {
160160
canonical: DiplomatUtf8StrSlice<'a>,
161161
}
162162

163-
#[diplomat::opaque]
163+
#[diplomat::opaque_mut]
164164
#[diplomat::rust_link(icu::time::zone::iana::TimeZoneAndCanonicalIter, Struct)]
165165
pub struct TimeZoneAndCanonicalIterator<'a>(icu_time::zone::iana::TimeZoneAndCanonicalIter<'a>);
166166

@@ -188,7 +188,7 @@ pub mod ffi {
188188
normalized: DiplomatUtf8StrSlice<'a>,
189189
}
190190

191-
#[diplomat::opaque]
191+
#[diplomat::opaque_mut]
192192
#[diplomat::rust_link(icu::time::zone::iana::TimeZoneAndCanonicalAndNormalizedIter, Struct)]
193193
pub struct TimeZoneAndCanonicalAndNormalizedIterator<'a>(
194194
icu_time::zone::iana::TimeZoneAndCanonicalAndNormalizedIter<'a>,

0 commit comments

Comments
 (0)