Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/impl_bytemuck.rs
Original file line number Diff line number Diff line change
Expand Up @@ -387,9 +387,9 @@ mod tests {
/// Tests that the [`Contiguous`] impl for [`Mix`] is not trivially incorrect.
const _: () = {
let mut value = 0;
while value <= ImageQuality::MAX_VALUE {
// Safety: In a const context, therefore if this makes an invalid ImageQuality, that will be detected.
let it: ImageQuality = unsafe { ptr::read((&raw const value).cast()) };
while value <= Mix::MAX_VALUE {
// Safety: In a const context, therefore if this makes an invalid Mix, that will be detected.
let it: Mix = unsafe { ptr::read((&raw const value).cast()) };
// Evaluate the enum value to ensure it actually has a valid tag
if it as u8 != value {
unreachable!();
Expand Down