Skip to content

Fix unstable-darwin-objc on recent nightlies - #899

Open
SuchAFuriousDeath wants to merge 1 commit into
madsmtm:mainfrom
SuchAFuriousDeath:darwin-objc-core-os
Open

SuchAFuriousDeath wants to merge 1 commit into
madsmtm:mainfrom
SuchAFuriousDeath:darwin-objc-core-os

Conversation

@SuchAFuriousDeath

Copy link
Copy Markdown

Fixes #897.

rust-lang/rust#160285 changed the stability gate of core::os from darwin_objc to a new core_os feature, so objc2 (which re-exports core::os::darwin::objc) now needs to enable both.

Only objc2 itself needs it: crates using the class!/sel! macros go through the re-export, and core's class!/selector! macros already have allow_internal_unstable(core_os). I checked objc2 and objc2-foundation with unstable-darwin-objc (+ unstable-static-sel/unstable-static-class) on aarch64-apple-darwin with nightly-2026-11-20.

Note that this makes the feature fail with unknown feature on nightlies before 2026-10-18, including the currently pinned nightly-2026-08-23. CI doesn't build with unstable-darwin-objc, so it's unaffected.

Since rust-lang/rust#160285, `core::os` is gated behind the `core_os`
feature, so `unstable-darwin-objc` failed to compile on recent nightlies.

Assisted-by: Claude Code (claude-opus-5-5)

@madsmtm madsmtm left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR, I'll probably be upgrading the pinned nightly myself, and end up fixing it in the same commit there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

unstable-darwin-objc fails to compile on nightly: missing core_os feature gate

2 participants