@@ -209,6 +209,8 @@ macro_rules! bitflags {
209
209
}
210
210
}
211
211
212
+ // NOTE(stage0): Remove impl after a snapshot
213
+ #[ cfg( stage0) ]
212
214
impl BitOr <$BitFlags, $BitFlags> for $BitFlags {
213
215
/// Returns the union of the two sets of flags.
214
216
#[ inline]
@@ -217,6 +219,17 @@ macro_rules! bitflags {
217
219
}
218
220
}
219
221
222
+ #[ cfg( not( stage0) ) ] // NOTE(stage0): Remove cfg after a snapshot
223
+ impl BitOr <$BitFlags, $BitFlags> for $BitFlags {
224
+ /// Returns the union of the two sets of flags.
225
+ #[ inline]
226
+ fn bitor( self , other: $BitFlags) -> $BitFlags {
227
+ $BitFlags { bits: self . bits | other. bits }
228
+ }
229
+ }
230
+
231
+ // NOTE(stage0): Remove impl after a snapshot
232
+ #[ cfg( stage0) ]
220
233
impl BitXor <$BitFlags, $BitFlags> for $BitFlags {
221
234
/// Returns the left flags, but with all the right flags toggled.
222
235
#[ inline]
@@ -225,6 +238,17 @@ macro_rules! bitflags {
225
238
}
226
239
}
227
240
241
+ #[ cfg( not( stage0) ) ] // NOTE(stage0): Remove cfg after a snapshot
242
+ impl BitXor <$BitFlags, $BitFlags> for $BitFlags {
243
+ /// Returns the left flags, but with all the right flags toggled.
244
+ #[ inline]
245
+ fn bitxor( self , other: $BitFlags) -> $BitFlags {
246
+ $BitFlags { bits: self . bits ^ other. bits }
247
+ }
248
+ }
249
+
250
+ // NOTE(stage0): Remove impl after a snapshot
251
+ #[ cfg( stage0) ]
228
252
impl BitAnd <$BitFlags, $BitFlags> for $BitFlags {
229
253
/// Returns the intersection between the two sets of flags.
230
254
#[ inline]
@@ -233,6 +257,17 @@ macro_rules! bitflags {
233
257
}
234
258
}
235
259
260
+ #[ cfg( not( stage0) ) ] // NOTE(stage0): Remove cfg after a snapshot
261
+ impl BitAnd <$BitFlags, $BitFlags> for $BitFlags {
262
+ /// Returns the intersection between the two sets of flags.
263
+ #[ inline]
264
+ fn bitand( self , other: $BitFlags) -> $BitFlags {
265
+ $BitFlags { bits: self . bits & other. bits }
266
+ }
267
+ }
268
+
269
+ // NOTE(stage0): Remove impl after a snapshot
270
+ #[ cfg( stage0) ]
236
271
impl Sub <$BitFlags, $BitFlags> for $BitFlags {
237
272
/// Returns the set difference of the two sets of flags.
238
273
#[ inline]
@@ -241,6 +276,15 @@ macro_rules! bitflags {
241
276
}
242
277
}
243
278
279
+ #[ cfg( not( stage0) ) ] // NOTE(stage0): Remove cfg after a snapshot
280
+ impl Sub <$BitFlags, $BitFlags> for $BitFlags {
281
+ /// Returns the set difference of the two sets of flags.
282
+ #[ inline]
283
+ fn sub( self , other: $BitFlags) -> $BitFlags {
284
+ $BitFlags { bits: self . bits & !other. bits }
285
+ }
286
+ }
287
+
244
288
impl Not <$BitFlags> for $BitFlags {
245
289
/// Returns the complement of this set of flags.
246
290
#[ inline]
0 commit comments