Skip to content

Remove implementation::{u32, u64} attribute macros - #882

Open
newpavlov wants to merge 4 commits into
masterfrom
eii_default
Open

newpavlov wants to merge 4 commits into
masterfrom
eii_default

Conversation

@newpavlov

@newpavlov newpavlov commented Nov 17, 2026 •

Copy link
Copy Markdown
Member

The recent change split default EII into a separate feature which is likely to take much longer to stabilize.

Bumps Nightly versions used in CI.

@newpavlov
newpavlov requested a review from josephlr November 17, 2026 02:38
@newpavlov newpavlov changed the title Switch to extern_item_default_impls unstable feature for extern_impl backend Enable extern_item_default_impls unstable feature for the extern_impl backend Nov 17, 2026
@newpavlov

newpavlov commented Nov 17, 2026 •

Copy link
Copy Markdown
Member Author

Huh, something weird happens. I explicitly use nightly-2026-11-16 in the rustdoc job, but logs report the following:

rustc +nightly-2026-11-16 --version --verbose
  rustc 1.102.0-nightly (5f4effd57 2026-11-13)
  binary: rustc
  commit-hash: 5f4effd579500175af844241eb179e756190f1e7
  commit-date: 2026-11-13
  host: x86_64-unknown-linux-gnu
  release: 1.102.0-nightly
  LLVM version: 23.1.5

Additionally, updating Nightly for the sanitizer job results in SIGSEGV.

@newpavlov

Copy link
Copy Markdown
Member Author

@josephlr
ping

@dhardy dhardy left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks acceptable as a temporary measure. What about the longer term — should we avoid providing default impls or switch to a trait API? Or just fall back on the custom backend? Because it sounds like the stabilisation prospects for extern_item_default_impls are very uncertain.

Docs should be updated?

@newpavlov

newpavlov commented Nov 26, 2026 •

Copy link
Copy Markdown
Member Author

We could switch to the non-default variant. I guess it should not matter in practice since it's unlikely that someone is using getrandom_backend="extern_impl" and not doing the override.

UPD: I misremembered how extern_impl backend works. Enabling it requires user to provide fill_uninit function, while u32/u64 functions are optional and will fall back to the default impl if not provided.

@newpavlov

Copy link
Copy Markdown
Member Author

I removed the u32/u64 attribute macros which relied on the default impl. It's a breaking change, but I think it's fine since extern_impl is an unstable backend.

@newpavlov newpavlov changed the title Enable extern_item_default_impls unstable feature for the extern_impl backend Remove implementation::{u32, u64} attribute macros Nov 27, 2026
@newpavlov newpavlov mentioned this pull request Nov 27, 2026
@dhardy

dhardy commented Nov 28, 2026

Copy link
Copy Markdown
Member

It's a breaking change, but I think it's fine since extern_impl is an unstable backend.

I don't love the idea of pushing a potentially-breaking change in a patch release, though it may be okay. Do you have any usage numbers?

@josephlr?

@newpavlov

Copy link
Copy Markdown
Member Author

I don't have any numbers, but we already have a breaking change on our hands anyway because of the toolchain changes.

Additionally, the removal should affect only those who define custom u32/u64 functions in addition to fill_uninit, which is likely a very small fraction of an already vanishingly small number of people using the extern_impl backend.

This branch has not been deployed

No deployments
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.

2 participants