Skip to content

Make Mask::splat const#466

Merged
calebzulawski merged 1 commit into
rust-lang:masterfrom
clarfonthey:const-mask-splat
Jun 13, 2025
Merged

Make Mask::splat const#466
calebzulawski merged 1 commit into
rust-lang:masterfrom
clarfonthey:const-mask-splat

Conversation

@clarfonthey

@clarfonthey clarfonthey commented Jun 13, 2025

Copy link
Copy Markdown
Contributor

This is a small step toward making more methods const.

While removing the Default bound was not strictly necessary, I found that it made sense to do given the implementation. Better to mention that it's not used here in the bounds than leave it in.

There are probably other mask methods that could be made const with minimal changes, but I didn't want to touch anything that used intrinsics and/or litter everything with const_eval_select to make it work.

Comment thread crates/core_simd/src/lane_count.rs Outdated
Comment thread crates/core_simd/src/masks/bitmask.rs
@calebzulawski
calebzulawski merged commit 704a1a9 into rust-lang:master Jun 13, 2025
59 checks passed
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.

3 participants