Update to bitflags 2 in the compiler
This involves lots of breaking changes. There are two big changes that force changes. The first is that the bitflag types now don't automatically implement normal derive traits, so we need to derive them manually. Additionally, bitflags now have a hidden inner type by default, which breaks our custom derives. The bitflags docs recommend using the impl form in these cases, which I did.
This commit is contained in:
parent
d59f06fc64
commit
ffafcd8819
32 changed files with 132 additions and 139 deletions
|
@ -101,6 +101,7 @@ use parking_lot::RwLock;
|
|||
use smallvec::SmallVec;
|
||||
|
||||
bitflags::bitflags! {
|
||||
#[derive(Clone, Copy)]
|
||||
struct EventFilter: u16 {
|
||||
const GENERIC_ACTIVITIES = 1 << 0;
|
||||
const QUERY_PROVIDERS = 1 << 1;
|
||||
|
@ -114,14 +115,14 @@ bitflags::bitflags! {
|
|||
const INCR_RESULT_HASHING = 1 << 8;
|
||||
const ARTIFACT_SIZES = 1 << 9;
|
||||
|
||||
const DEFAULT = Self::GENERIC_ACTIVITIES.bits |
|
||||
Self::QUERY_PROVIDERS.bits |
|
||||
Self::QUERY_BLOCKED.bits |
|
||||
Self::INCR_CACHE_LOADS.bits |
|
||||
Self::INCR_RESULT_HASHING.bits |
|
||||
Self::ARTIFACT_SIZES.bits;
|
||||
const DEFAULT = Self::GENERIC_ACTIVITIES.bits() |
|
||||
Self::QUERY_PROVIDERS.bits() |
|
||||
Self::QUERY_BLOCKED.bits() |
|
||||
Self::INCR_CACHE_LOADS.bits() |
|
||||
Self::INCR_RESULT_HASHING.bits() |
|
||||
Self::ARTIFACT_SIZES.bits();
|
||||
|
||||
const ARGS = Self::QUERY_KEYS.bits | Self::FUNCTION_ARGS.bits;
|
||||
const ARGS = Self::QUERY_KEYS.bits() | Self::FUNCTION_ARGS.bits();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue