use assoc types in binop traits
This commit is contained in:
parent
7095dd0070
commit
99017f82b6
36 changed files with 375 additions and 156 deletions
|
|
@ -209,7 +209,9 @@ macro_rules! bitflags {
|
|||
}
|
||||
}
|
||||
|
||||
impl ::std::ops::BitOr<$BitFlags, $BitFlags> for $BitFlags {
|
||||
impl ::std::ops::BitOr for $BitFlags {
|
||||
type Output = $BitFlags;
|
||||
|
||||
/// Returns the union of the two sets of flags.
|
||||
#[inline]
|
||||
fn bitor(self, other: $BitFlags) -> $BitFlags {
|
||||
|
|
@ -217,7 +219,9 @@ macro_rules! bitflags {
|
|||
}
|
||||
}
|
||||
|
||||
impl ::std::ops::BitXor<$BitFlags, $BitFlags> for $BitFlags {
|
||||
impl ::std::ops::BitXor for $BitFlags {
|
||||
type Output = $BitFlags;
|
||||
|
||||
/// Returns the left flags, but with all the right flags toggled.
|
||||
#[inline]
|
||||
fn bitxor(self, other: $BitFlags) -> $BitFlags {
|
||||
|
|
@ -225,7 +229,9 @@ macro_rules! bitflags {
|
|||
}
|
||||
}
|
||||
|
||||
impl ::std::ops::BitAnd<$BitFlags, $BitFlags> for $BitFlags {
|
||||
impl ::std::ops::BitAnd for $BitFlags {
|
||||
type Output = $BitFlags;
|
||||
|
||||
/// Returns the intersection between the two sets of flags.
|
||||
#[inline]
|
||||
fn bitand(self, other: $BitFlags) -> $BitFlags {
|
||||
|
|
@ -233,7 +239,9 @@ macro_rules! bitflags {
|
|||
}
|
||||
}
|
||||
|
||||
impl ::std::ops::Sub<$BitFlags, $BitFlags> for $BitFlags {
|
||||
impl ::std::ops::Sub for $BitFlags {
|
||||
type Output = $BitFlags;
|
||||
|
||||
/// Returns the set difference of the two sets of flags.
|
||||
#[inline]
|
||||
fn sub(self, other: $BitFlags) -> $BitFlags {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue