constant: Add support for unary negation.

This commit is contained in:
Emilio Cobos Álvarez
2022-06-07 16:53:58 +02:00
parent 021d09db2b
commit 5da3715187
11 changed files with 17 additions and 0 deletions
+1
View File
@@ -34,6 +34,7 @@ bitflags! {
pub struct LargeFlags: u64 {
/// Flag with a very large shift that usually would be narrowed.
const LARGE_SHIFT = 1u64 << 44;
const INVERTED = !Self::LARGE_SHIFT.bits;
}
}