auto merge of #19742 : vhbit/rust/copy-for-bitflags, r=alexcrichton

This commit is contained in:
bors 2014-12-15 00:07:35 +00:00
commit 126db549b0
6 changed files with 1 additions and 16 deletions

View File

@ -635,8 +635,6 @@ bitflags! {
}
}
impl Copy for DefModifiers {}
// Records a possibly-private type definition.
#[deriving(Clone)]
struct TypeNsDef {

View File

@ -801,8 +801,6 @@ bitflags! {
}
}
impl Copy for TypeFlags {}
#[deriving(Show)]
pub struct TyS<'tcx> {
pub sty: sty<'tcx>,

View File

@ -150,7 +150,6 @@ bitflags! {
}
}
impl Copy for Attribute {}
#[repr(u64)]
pub enum OtherAttribute {

View File

@ -33,8 +33,6 @@
/// }
/// }
///
/// impl Copy for Flags {}
///
/// fn main() {
/// let e1 = FLAG_A | FLAG_C;
/// let e2 = FLAG_B | FLAG_C;
@ -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
@ -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,
@ -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);

View File

@ -1910,7 +1910,6 @@ bitflags! {
}
}
impl Copy for FilePermission {}
impl Default for FilePermission {
#[inline]

View File

@ -98,7 +98,6 @@ bitflags! {
}
}
impl Copy for Restrictions {}
type ItemInfo = (Ident, Item_, Option<Vec<Attribute> >);