Skip to content

Commit e25aa5f

Browse files
author
Jorge Aparicio
committed
---
yaml --- r: 163432 b: refs/heads/snap-stage3 c: 32168fa h: refs/heads/master v: v3
1 parent 5565092 commit e25aa5f

File tree

2 files changed

+45
-1
lines changed

2 files changed

+45
-1
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: 9146a919b616e39e528e4d7100d16eef52f1f852
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: baf79d4a118c42f9ac0a7df3ff9b566d1450140d
4+
refs/heads/snap-stage3: 32168faf9f7a9e634647b86c1a671ae68dbe9c9d
55
refs/heads/try: 20cbbffeefc1f35e2ea63afce7b42fbd79611d42
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d

branches/snap-stage3/src/libstd/bitflags.rs

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,8 @@ macro_rules! bitflags {
209209
}
210210
}
211211

212+
// NOTE(stage0): Remove impl after a snapshot
213+
#[cfg(stage0)]
212214
impl BitOr<$BitFlags, $BitFlags> for $BitFlags {
213215
/// Returns the union of the two sets of flags.
214216
#[inline]
@@ -217,6 +219,17 @@ macro_rules! bitflags {
217219
}
218220
}
219221

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)]
220233
impl BitXor<$BitFlags, $BitFlags> for $BitFlags {
221234
/// Returns the left flags, but with all the right flags toggled.
222235
#[inline]
@@ -225,6 +238,17 @@ macro_rules! bitflags {
225238
}
226239
}
227240

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)]
228252
impl BitAnd<$BitFlags, $BitFlags> for $BitFlags {
229253
/// Returns the intersection between the two sets of flags.
230254
#[inline]
@@ -233,6 +257,17 @@ macro_rules! bitflags {
233257
}
234258
}
235259

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)]
236271
impl Sub<$BitFlags, $BitFlags> for $BitFlags {
237272
/// Returns the set difference of the two sets of flags.
238273
#[inline]
@@ -241,6 +276,15 @@ macro_rules! bitflags {
241276
}
242277
}
243278

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+
244288
impl Not<$BitFlags> for $BitFlags {
245289
/// Returns the complement of this set of flags.
246290
#[inline]

0 commit comments

Comments
 (0)