1a1645d3b1
I feel that this is a very vital, missing piece of functionality. This adds on to #13072. Only bits used in the definition of the bitflag are considered for the universe set. This is a bit safer than simply inverting all of the bits in the wrapped value. ```rust bitflags!(flags Flags: u32 { FlagA = 0x00000001, FlagB = 0x00000010, FlagC = 0x00000100, FlagABC = FlagA.bits | FlagB.bits | FlagC.bits }) ... // `Not` implements set complement assert!(!(FlagB | FlagC) == FlagA); // `all` and `is_all` are the inverses of `empty` and `is_empty` assert!(Flags::all() - FlagA == !FlagA); assert!(FlagABC.is_all()); ``` |
||
---|---|---|
.. | ||
net | ||
buffered.rs | ||
comm_adapters.rs | ||
extensions.rs | ||
flate.rs | ||
fs.rs | ||
mem.rs | ||
mod.rs | ||
pipe.rs | ||
process.rs | ||
result.rs | ||
signal.rs | ||
stdio.rs | ||
tempfile.rs | ||
test.rs | ||
timer.rs | ||
util.rs |