Closed zachs18 closed 3 months ago
(I believe the CI failures are due to https://github.com/rust-lang/rust/issues/128808)
Because it's an optional feature and because 1.64 is quite old at this point i think we can ignore the msrv.
I'd like to probably wait on CI if the nightly rust bug is going to only be a day or two
(Current nightly has the fix; force-pushed for CI)
Released bytemuck-v1.17.0
(but not by-mut-ref, since that's not stable).
This would raise the MSRV of the
must_cast
feature from 1.57.0 to 1.64.0 (whenslice_from_raw_parts
was made const-stable). Alternately, this could be added as a new feature (const_must_cast
?) with its own MSRV[^1].The new arm of the
transmute!
macro is to work around borrowing a generic type in const-eval not being allowed on stable, since the borrowed type could have interior mutabilty. Transmuting viaunion
does not have this issue, since no borrowing occurs.[^1]:
must_cast
andmust_cast_ref
's MSRV is at least 1.61.0, whenconst_fn_trait_bound
was stabilized.must_cast_slice
's MSRV is at least 1.64.0, as mentioned.