Skip to content

Commit

Permalink
Can use assert! in a const context now.
Browse files Browse the repository at this point in the history
  • Loading branch information
bitshifter committed Jun 13, 2022
1 parent b631b07 commit 21b467f
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,7 @@ macro_rules! const_assert {
// FIXME: everything is align 16 on spirv - ignore for now
#[cfg(not(target_arch = "spirv"))]
#[allow(unknown_lints, clippy::eq_op)]
const _: [(); 0 - !{
const ASSERT: bool = $x;
ASSERT
} as usize] = [];
const _: () = assert!($x);
};
}

Expand Down

0 comments on commit 21b467f

Please sign in to comment.