about summary refs log tree commit diff
path: root/src/libstd/bitflags.rs
diff options
context:
space:
mode:
authorJorge Aparicio <japaricious@gmail.com>2014-12-31 15:45:13 -0500
committerJorge Aparicio <japaricious@gmail.com>2015-01-03 16:29:19 -0500
commit99017f82b6e41ed283199b88ddfc0990bb95d696 (patch)
tree66cd460eb70ab440425b66bb81651820c1d58469 /src/libstd/bitflags.rs
parent7095dd00702373dd612d61e191eb57fadce00751 (diff)
downloadrust-99017f82b6e41ed283199b88ddfc0990bb95d696.tar.gz
rust-99017f82b6e41ed283199b88ddfc0990bb95d696.zip
use assoc types in binop traits
Diffstat (limited to 'src/libstd/bitflags.rs')
-rw-r--r--src/libstd/bitflags.rs16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/libstd/bitflags.rs b/src/libstd/bitflags.rs
index c07531d3f32..a9c74823dde 100644
--- a/src/libstd/bitflags.rs
+++ b/src/libstd/bitflags.rs
@@ -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 {