Skip to content

Commit 126db54

Browse files
committed
auto merge of #19742 : vhbit/rust/copy-for-bitflags, r=alexcrichton
2 parents 6085a71 + 319c379 commit 126db54

File tree

6 files changed

+1
-16
lines changed

6 files changed

+1
-16
lines changed

src/librustc/middle/resolve.rs

-2
Original file line numberDiff line numberDiff line change
@@ -635,8 +635,6 @@ bitflags! {
635635
}
636636
}
637637

638-
impl Copy for DefModifiers {}
639-
640638
// Records a possibly-private type definition.
641639
#[deriving(Clone)]
642640
struct TypeNsDef {

src/librustc/middle/ty.rs

-2
Original file line numberDiff line numberDiff line change
@@ -801,8 +801,6 @@ bitflags! {
801801
}
802802
}
803803

804-
impl Copy for TypeFlags {}
805-
806804
#[deriving(Show)]
807805
pub struct TyS<'tcx> {
808806
pub sty: sty<'tcx>,

src/librustc_llvm/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,6 @@ bitflags! {
150150
}
151151
}
152152

153-
impl Copy for Attribute {}
154153

155154
#[repr(u64)]
156155
pub enum OtherAttribute {

src/libstd/bitflags.rs

+1-9
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,6 @@
3333
/// }
3434
/// }
3535
///
36-
/// impl Copy for Flags {}
37-
///
3836
/// fn main() {
3937
/// let e1 = FLAG_A | FLAG_C;
4038
/// let e2 = FLAG_B | FLAG_C;
@@ -57,8 +55,6 @@
5755
/// }
5856
/// }
5957
///
60-
/// impl Copy for Flags {}
61-
///
6258
/// impl Flags {
6359
/// pub fn clear(&mut self) {
6460
/// self.bits = 0; // The `bits` field can be accessed from within the
@@ -121,7 +117,7 @@ macro_rules! bitflags {
121117
($(#[$attr:meta])* flags $BitFlags:ident: $T:ty {
122118
$($(#[$Flag_attr:meta])* const $Flag:ident = $value:expr),+
123119
}) => {
124-
#[deriving(PartialEq, Eq, Clone, PartialOrd, Ord, Hash)]
120+
#[deriving(Copy, PartialEq, Eq, Clone, PartialOrd, Ord, Hash)]
125121
$(#[$attr])*
126122
pub struct $BitFlags {
127123
bits: $T,
@@ -288,16 +284,12 @@ mod tests {
288284
}
289285
}
290286

291-
impl Copy for Flags {}
292-
293287
bitflags! {
294288
flags AnotherSetOfFlags: i8 {
295289
const AnotherFlag = -1_i8,
296290
}
297291
}
298292

299-
impl Copy for AnotherSetOfFlags {}
300-
301293
#[test]
302294
fn test_bits(){
303295
assert_eq!(Flags::empty().bits(), 0x00000000);

src/libstd/io/mod.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1910,7 +1910,6 @@ bitflags! {
19101910
}
19111911
}
19121912

1913-
impl Copy for FilePermission {}
19141913

19151914
impl Default for FilePermission {
19161915
#[inline]

src/libsyntax/parse/parser.rs

-1
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,6 @@ bitflags! {
9898
}
9999
}
100100

101-
impl Copy for Restrictions {}
102101

103102
type ItemInfo = (Ident, Item_, Option<Vec<Attribute> >);
104103

0 commit comments

Comments
 (0)