Skip to content

Commit 72288fb

Browse files
authored
Merge pull request #436 from madsmtm/update-nightly
Update dependencies and nightly CI version
2 parents 0365ef4 + 40614ac commit 72288fb

File tree

68 files changed

+663
-711
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+663
-711
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ env:
4444
--package=objc2-encode
4545
--package=objc2-proc-macros
4646
# The current nightly Rust version that our CI uses
47-
CURRENT_NIGHTLY: nightly-2023-02-07
47+
CURRENT_NIGHTLY: nightly-2023-04-12
4848
# Various features that we'd usually want to test with
4949
#
5050
# Note: The `exception` feature is not enabled here, since it requires

Cargo.lock

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

crates/header-translator/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@ license = "Zlib OR Apache-2.0 OR MIT"
1010
[dependencies]
1111
clang = { version = "2.0", features = ["runtime", "clang_10_0"] }
1212
clang-sys = { version = "1.4.0" }
13-
toml = "0.5.9"
13+
basic-toml = "0.1.2"
1414
serde = { version = "1.0.144", features = ["derive"] }
1515
apple-sdk = { version = "0.4.0", default-features = false }
1616
tracing = { version = "0.1.37", default-features = false, features = ["std"] }
1717
tracing-subscriber = { version = "0.3.16", features = ["fmt"] }
1818
tracing-tree = { git = "https://github.com/madsmtm/tracing-tree.git" }
1919
proc-macro2 = "1.0.49"
20-
syn = { version = "1.0", features = ["parsing"] }
20+
syn = { version = "2.0", features = ["parsing"] }
2121
heck = "0.4"
2222
semver = { version = "1.0", features = ["serde"] }

crates/header-translator/src/bin/check_icrate_features.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ fn main() -> Result<(), Box<dyn Error>> {
4141
let crates_dir = manifest_dir.parent().unwrap();
4242
let cargo_toml = fs::read_to_string(crates_dir.join("icrate").join("Cargo.toml"))?;
4343

44-
let CargoToml { features } = toml::from_str(&cargo_toml)?;
44+
let CargoToml { features } = basic_toml::from_str(&cargo_toml)?;
4545

4646
println!("Testing all Foundation features in `icrate`");
4747

crates/header-translator/src/config.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use std::collections::{HashMap, HashSet};
2+
use std::error::Error;
23
use std::fs;
3-
use std::io::Result;
44
use std::path::Path;
55

66
use serde::Deserialize;
@@ -206,10 +206,10 @@ impl Default for MethodData {
206206
}
207207

208208
impl Config {
209-
pub fn from_file(file: &Path) -> Result<Self> {
209+
pub fn from_file(file: &Path) -> Result<Self, Box<dyn Error>> {
210210
let s = fs::read_to_string(file)?;
211211

212-
let mut this = toml::from_str(&s)?;
212+
let mut this = basic_toml::from_str(&s)?;
213213

214214
data::apply_tweaks(&mut this);
215215

crates/header-translator/src/rust_type.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -557,10 +557,9 @@ enum Inner {
557557
}
558558

559559
impl Inner {
560-
fn parse(ty: Type<'_>, mut lifetime: Lifetime, context: &Context<'_>) -> Self {
561-
let _span = debug_span!("ty", ?ty, ?lifetime).entered();
560+
fn parse(attributed_ty: Type<'_>, mut lifetime: Lifetime, context: &Context<'_>) -> Self {
561+
let _span = debug_span!("ty", ?attributed_ty, ?lifetime).entered();
562562

563-
let attributed_ty = ty;
564563
let mut ty = attributed_ty;
565564
while let TypeKind::Attributed = ty.get_kind() {
566565
ty = ty
@@ -729,9 +728,8 @@ impl Inner {
729728
drop(parser);
730729

731730
let pointer_name = ty.get_display_name();
732-
let ty = ty.get_pointee_type().expect("pointer type to have pointee");
731+
let attributed_ty = ty.get_pointee_type().expect("pointer type to have pointee");
733732

734-
let attributed_ty = ty;
735733
let mut ty = attributed_ty;
736734
while let TypeKind::Attributed = ty.get_kind() {
737735
ty = ty

crates/icrate/src/Foundation/additions/enumerator.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,8 @@ impl<'a, C: NSFastEnumeration2 + ?Sized> Iterator for NSFastEnumerator2<'a, C> {
157157
None
158158
} else {
159159
unsafe {
160-
let obj = *self.ptr;
160+
// TODO
161+
let obj = self.ptr.read_unaligned();
161162
self.ptr = self.ptr.offset(1);
162163
Some(obj.as_ref().unwrap_unchecked())
163164
}

0 commit comments

Comments
 (0)