Handle bitflags bits method calls

This commit is contained in:
Mike Hommey
2023-09-09 06:28:48 +09:00
committed by Emilio Cobos Álvarez
parent f72e447156
commit 43af1ebe6e
3 changed files with 84 additions and 8 deletions
+4 -4
View File
@@ -13,11 +13,11 @@ bitflags! {
const START = 1 << 1;
/// 'end'
const END = 1 << 2;
const ALIAS = Self::END.bits;
const ALIAS = Self::END.bits();
/// 'flex-start'
const FLEX_START = 1 << 3;
const MIXED = 1 << 4 | AlignFlags::FLEX_START.bits | AlignFlags::END.bits;
const MIXED_SELF = 1 << 5 | AlignFlags::FLEX_START.bits | AlignFlags::END.bits;
const MIXED = 1 << 4 | AlignFlags::FLEX_START.bits() | AlignFlags::END.bits();
const MIXED_SELF = 1 << 5 | AlignFlags::FLEX_START.bits() | AlignFlags::END.bits();
}
}
@@ -34,7 +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;
const INVERTED = !Self::LARGE_SHIFT.bits();
}
}