diff options
| author | Niko Matsakis <niko@alum.mit.edu> | 2014-10-31 05:40:15 -0400 |
|---|---|---|
| committer | Niko Matsakis <niko@alum.mit.edu> | 2014-11-05 09:15:28 -0500 |
| commit | 4af52eee59ff25a7f636798bdbc3f1bec985828f (patch) | |
| tree | c2755fd2d374ba8a6fb303d8c977e58be720c8dc /src/libstd/bitflags.rs | |
| parent | 98958bcaf403354dff0a390db0206e2e03336180 (diff) | |
| download | rust-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.rs | 4 |
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. |
