rust-lang / packed_simd

Portable Packed SIMD Vectors for Rust standard library
https://rust-lang.github.io/packed_simd/packed_simd_2/
Apache License 2.0
589 stars 74 forks source link

0.3.5: Get current with rustc const generics #322

Closed workingjubilee closed 3 years ago

workingjubilee commented 3 years ago

This PR fixes the build for packed_simd_2, now 0.3.5, with the current nightly, for all major platforms. This is motivated by several internal changes to how rustc handles const arguments, as packed_simd is an avid consumer of the hidden dragons inside rustc's internal APIs and so the breakage affects packed_simd.

There should be no external API changes, though the change in the shuffle macros may hypothetically complicate life for users if there is some hidden complexity involving expansion and the usage of const generics in the API. This is considered a wholly acceptable breakage if it does occur. Barring that, a user should be able to build this version of packed_simd if they are up to date with at least:

packed_simd> rustc --version
rustc 1.54.0-nightly (8cf990c9b 2021-05-15)

The later commits also kill clippy checks and #[deny(warnings)] cases on the examples because keeping up with those is an unacceptable drag on maintenance at this late stage of the game. However, the warnings do indicate there is an unsound code pattern somewhere inside these examples or inside packed_simd. aobench is the one I first noticed this warning within, but it is endemic to the examples.

Hopefully the Portable SIMD API group (et moi) manages to land core::simd before I need to do another maintenance release like this, so I can just tell people to move to that instead.