@@ -183,30 +183,66 @@ impl<E:CLike> EnumSet<E> {
183
183
}
184
184
}
185
185
186
+ // NOTE(stage0): Remove impl after a snapshot
187
+ #[ cfg( stage0) ]
186
188
impl < E : CLike > Sub < EnumSet < E > , EnumSet < E > > for EnumSet < E > {
187
189
fn sub ( & self , e : & EnumSet < E > ) -> EnumSet < E > {
188
190
EnumSet { bits : self . bits & !e. bits }
189
191
}
190
192
}
191
193
194
+ #[ cfg( not( stage0) ) ] // NOTE(stage0): Remove cfg after a snapshot
195
+ impl < E : CLike > Sub < EnumSet < E > , EnumSet < E > > for EnumSet < E > {
196
+ fn sub ( self , e : EnumSet < E > ) -> EnumSet < E > {
197
+ EnumSet { bits : self . bits & !e. bits }
198
+ }
199
+ }
200
+
201
+ // NOTE(stage0): Remove impl after a snapshot
202
+ #[ cfg( stage0) ]
192
203
impl < E : CLike > BitOr < EnumSet < E > , EnumSet < E > > for EnumSet < E > {
193
204
fn bitor ( & self , e : & EnumSet < E > ) -> EnumSet < E > {
194
205
EnumSet { bits : self . bits | e. bits }
195
206
}
196
207
}
197
208
209
+ #[ cfg( not( stage0) ) ] // NOTE(stage0): Remove cfg after a snapshot
210
+ impl < E : CLike > BitOr < EnumSet < E > , EnumSet < E > > for EnumSet < E > {
211
+ fn bitor ( self , e : EnumSet < E > ) -> EnumSet < E > {
212
+ EnumSet { bits : self . bits | e. bits }
213
+ }
214
+ }
215
+
216
+ // NOTE(stage0): Remove impl after a snapshot
217
+ #[ cfg( stage0) ]
198
218
impl < E : CLike > BitAnd < EnumSet < E > , EnumSet < E > > for EnumSet < E > {
199
219
fn bitand ( & self , e : & EnumSet < E > ) -> EnumSet < E > {
200
220
EnumSet { bits : self . bits & e. bits }
201
221
}
202
222
}
203
223
224
+ #[ cfg( not( stage0) ) ] // NOTE(stage0): Remove cfg after a snapshot
225
+ impl < E : CLike > BitAnd < EnumSet < E > , EnumSet < E > > for EnumSet < E > {
226
+ fn bitand ( self , e : EnumSet < E > ) -> EnumSet < E > {
227
+ EnumSet { bits : self . bits & e. bits }
228
+ }
229
+ }
230
+
231
+ // NOTE(stage0): Remove impl after a snapshot
232
+ #[ cfg( stage0) ]
204
233
impl < E : CLike > BitXor < EnumSet < E > , EnumSet < E > > for EnumSet < E > {
205
234
fn bitxor ( & self , e : & EnumSet < E > ) -> EnumSet < E > {
206
235
EnumSet { bits : self . bits ^ e. bits }
207
236
}
208
237
}
209
238
239
+ #[ cfg( not( stage0) ) ] // NOTE(stage0): Remove cfg after a snapshot
240
+ impl < E : CLike > BitXor < EnumSet < E > , EnumSet < E > > for EnumSet < E > {
241
+ fn bitxor ( self , e : EnumSet < E > ) -> EnumSet < E > {
242
+ EnumSet { bits : self . bits ^ e. bits }
243
+ }
244
+ }
245
+
210
246
/// An iterator over an EnumSet
211
247
pub struct Items < E > {
212
248
index : uint ,
0 commit comments