We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
BitFlags
1 parent 5359879 commit 340f042Copy full SHA for 340f042
src/libstd/bitflags.rs
@@ -281,13 +281,24 @@ macro_rules! bitflags {
281
}
282
283
284
+ // NOTE(stage0): Remove impl after a snapshot
285
+ #[cfg(stage0)]
286
impl Not<$BitFlags> for $BitFlags {
287
/// Returns the complement of this set of flags.
288
#[inline]
289
fn not(&self) -> $BitFlags {
290
$BitFlags { bits: !self.bits } & $BitFlags::all()
291
292
293
+
294
+ #[cfg(not(stage0))] // NOTE(stage0): Remove cfg after a snapshot
295
+ impl Not<$BitFlags> for $BitFlags {
296
+ /// Returns the complement of this set of flags.
297
+ #[inline]
298
+ fn not(self) -> $BitFlags {
299
+ $BitFlags { bits: !self.bits } & $BitFlags::all()
300
+ }
301
302
};
303
($(#[$attr:meta])* flags $BitFlags:ident: $T:ty {
304
$($(#[$Flag_attr:meta])* const $Flag:ident = $value:expr),+,
0 commit comments