Skip to content

Fix nightly_portable_simd after LaneCount removal.#344

Merged
Lokathor merged 1 commit into
Lokathor:mainfrom
anforowicz:fix-simd
Jan 31, 2026
Merged

Fix nightly_portable_simd after LaneCount removal.#344
Lokathor merged 1 commit into
Lokathor:mainfrom
anforowicz:fix-simd

Conversation

@anforowicz
Copy link
Copy Markdown
Contributor

rust-lang/rust@0eaef59 (which included rust-lang/portable-simd#485) was merged on 2026-01-27 and removed core::simd::LaneCount. This bytemuck commit ensures that nightly_portable_simd feature of bytemuck can build with nightly Rust before and after the LaneCount change.

Fixes #343

@anforowicz
Copy link
Copy Markdown
Contributor Author

Hmmm... it seems that https://doc.rust-lang.org/cargo/reference/features.html says that the dep:rustversion is only available starting with Rust 1.60. I am not sure what this PR should do to address this. Maybe making rustversion dependency unconditional is okay? Let me try that.

@anforowicz
Copy link
Copy Markdown
Contributor Author

Hmmm... it seems that https://doc.rust-lang.org/cargo/reference/features.html says that the dep:rustversion is only available starting with Rust 1.60. I am not sure what this PR should do to address this. Maybe making rustversion dependency unconditional is okay? Let me try that.

Actually, in local testing it seems that just replacing dep:rustversion with rustversion works. (And this seems okay, because bytemuck's Cargo.toml doesn't declare a feature called rustversion, so there is no conflict.)

rust-lang/rust@0eaef59
(which included rust-lang/portable-simd#485)
was merged on 2026-01-27 and removed `core::simd::LaneCount`.  This
`bytemuck` commit ensures that `nightly_portable_simd` feature of
`bytemuck` can build with nightly Rust before and after the `LaneCount`
change.

Fixes Lokathor#343
@Lokathor
Copy link
Copy Markdown
Owner

Lokathor commented Jan 31, 2026

I can't get to this for a few hours but I will try to get to it tonight.

@anforowicz
Copy link
Copy Markdown
Contributor Author

I can't get to this for a few hours but I will try to get to it tonight.

Thanks! FWIW Chromium's Rust toolchain roll should be unblocked at this point by https://crrev.com/c/7535942/2..3, so (at least from Chromium perspective) this PR isn't very urgent - totally fine to get to it in the next few days or so. (i.e. Chromium can temporarily carry a Chromium-specific patch for bytemuck and then absorb the long-term fix [e.g. from this PR] when a new version of bytemuck is released to crates.io.)

@Lokathor Lokathor merged commit 7009d79 into Lokathor:main Jan 31, 2026
15 checks passed
@Lokathor
Copy link
Copy Markdown
Owner

released in 1.25

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

Labels

semver-patch semver patch change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

zeroable.rs uses LaneCount which has been removed

2 participants