about summary refs log tree commit diff
path: root/src/libstd
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
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')
-rw-r--r--src/libstd/bitflags.rs4
-rw-r--r--src/libstd/time/duration.rs2
2 files changed, 3 insertions, 3 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.
diff --git a/src/libstd/time/duration.rs b/src/libstd/time/duration.rs
index 102f0028557..c3adae8cff8 100644
--- a/src/libstd/time/duration.rs
+++ b/src/libstd/time/duration.rs
@@ -319,7 +319,7 @@ impl fmt::Show for Duration {
     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
         // technically speaking, negative duration is not valid ISO 8601,
         // but we need to print it anyway.
-        let (abs, sign) = if self.secs < 0 { (-self, "-") } else { (*self, "") };
+        let (abs, sign) = if self.secs < 0 { (-*self, "-") } else { (*self, "") };
 
         let days = abs.secs / SECS_PER_DAY;
         let secs = abs.secs - days * SECS_PER_DAY;