about summary refs log tree commit diff
path: root/src/libstd/bitflags.rs
diff options
context:
space:
mode:
authorNiko Matsakis <niko@alum.mit.edu>2014-10-31 05:40:15 -0400
committerNiko Matsakis <niko@alum.mit.edu>2014-11-05 09:15:28 -0500
commit4af52eee59ff25a7f636798bdbc3f1bec985828f (patch)
treec2755fd2d374ba8a6fb303d8c977e58be720c8dc /src/libstd/bitflags.rs
parent98958bcaf403354dff0a390db0206e2e03336180 (diff)
downloadrust-4af52eee59ff25a7f636798bdbc3f1bec985828f.tar.gz
rust-4af52eee59ff25a7f636798bdbc3f1bec985828f.zip
Repair various cases where values of distinct types were being operated
upon (e.g., `&int` added to `int`).
Diffstat (limited to 'src/libstd/bitflags.rs')
-rw-r--r--src/libstd/bitflags.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libstd/bitflags.rs b/src/libstd/bitflags.rs
index 97a1f68606f..d8023dd3e4e 100644
--- a/src/libstd/bitflags.rs
+++ b/src/libstd/bitflags.rs
@@ -177,13 +177,13 @@ macro_rules! bitflags {
             /// Returns `true` if there are flags common to both `self` and `other`.
             #[inline]
             pub fn intersects(&self, other: $BitFlags) -> bool {
-                !(self & other).is_empty()
+                !(*self & other).is_empty()
             }
 
             /// Returns `true` all of the flags in `other` are contained within `self`.
             #[inline]
             pub fn contains(&self, other: $BitFlags) -> bool {
-                (self & other) == other
+                (*self & other) == other
             }
 
             /// Inserts the specified flags in-place.