Macro qed::const_assert_ne
source · macro_rules! const_assert_ne { ($x:expr, $y:expr $(,)?) => { ... }; }
Expand description
Asserts that two expressions are not equal to each other (using
PartialEq
) at compile time.
See also const_assert!
.
§Examples
const END_OF_PROOF: char = '∎';
qed::const_assert_ne!(END_OF_PROOF.len_utf8(), 1);
The following fails to compile because the expressions are equal:
ⓘ
const END_OF_PROOF: char = '∎';
qed::const_assert_ne!(END_OF_PROOF.len_utf8(), 3);