Skip to content

Commit

Permalink
auto merge of #19742 : vhbit/rust/copy-for-bitflags, r=alexcrichton
Browse files Browse the repository at this point in the history
  • Loading branch information
bors committed Dec 15, 2014
2 parents 6085a71 + 319c379 commit 126db54
Show file tree
Hide file tree
Showing 6 changed files with 1 addition and 16 deletions.
2 changes: 0 additions & 2 deletions src/librustc/middle/resolve.rs
Expand Up @@ -635,8 +635,6 @@ bitflags! {
}
}

impl Copy for DefModifiers {}

// Records a possibly-private type definition.
#[deriving(Clone)]
struct TypeNsDef {
Expand Down
2 changes: 0 additions & 2 deletions src/librustc/middle/ty.rs
Expand Up @@ -801,8 +801,6 @@ bitflags! {
}
}

impl Copy for TypeFlags {}

#[deriving(Show)]
pub struct TyS<'tcx> {
pub sty: sty<'tcx>,
Expand Down
1 change: 0 additions & 1 deletion src/librustc_llvm/lib.rs
Expand Up @@ -150,7 +150,6 @@ bitflags! {
}
}

impl Copy for Attribute {}

#[repr(u64)]
pub enum OtherAttribute {
Expand Down
10 changes: 1 addition & 9 deletions src/libstd/bitflags.rs
Expand Up @@ -33,8 +33,6 @@
/// }
/// }
///
/// impl Copy for Flags {}
///
/// fn main() {
/// let e1 = FLAG_A | FLAG_C;
/// let e2 = FLAG_B | FLAG_C;
Expand All @@ -57,8 +55,6 @@
/// }
/// }
///
/// impl Copy for Flags {}
///
/// impl Flags {
/// pub fn clear(&mut self) {
/// self.bits = 0; // The `bits` field can be accessed from within the
Expand Down Expand Up @@ -121,7 +117,7 @@ macro_rules! bitflags {
($(#[$attr:meta])* flags $BitFlags:ident: $T:ty {
$($(#[$Flag_attr:meta])* const $Flag:ident = $value:expr),+
}) => {
#[deriving(PartialEq, Eq, Clone, PartialOrd, Ord, Hash)]
#[deriving(Copy, PartialEq, Eq, Clone, PartialOrd, Ord, Hash)]
$(#[$attr])*
pub struct $BitFlags {
bits: $T,
Expand Down Expand Up @@ -288,16 +284,12 @@ mod tests {
}
}

impl Copy for Flags {}

bitflags! {
flags AnotherSetOfFlags: i8 {
const AnotherFlag = -1_i8,
}
}

impl Copy for AnotherSetOfFlags {}

#[test]
fn test_bits(){
assert_eq!(Flags::empty().bits(), 0x00000000);
Expand Down
1 change: 0 additions & 1 deletion src/libstd/io/mod.rs
Expand Up @@ -1910,7 +1910,6 @@ bitflags! {
}
}

impl Copy for FilePermission {}

impl Default for FilePermission {
#[inline]
Expand Down
1 change: 0 additions & 1 deletion src/libsyntax/parse/parser.rs
Expand Up @@ -98,7 +98,6 @@ bitflags! {
}
}

impl Copy for Restrictions {}

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

Expand Down

0 comments on commit 126db54

Please sign in to comment.