about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2014-12-21 00:07:29 -0800
committerAlex Crichton <alex@alexcrichton.com>2014-12-21 09:28:07 -0800
commitdbeef0edb2d25a3ff321d8e09532f053b5ef2c07 (patch)
tree9ac43217e9134d908926c2aa7bfda279582f1ee6 /src/libstd
parentb084cda4e9e0540b67d5db728b58acf8afba9f6e (diff)
parent84086c464f537591f0e4629676b3fc75517492ab (diff)
downloadrust-dbeef0edb2d25a3ff321d8e09532f053b5ef2c07.tar.gz
rust-dbeef0edb2d25a3ff321d8e09532f053b5ef2c07.zip
rollup merge of #19972: alexcrichton/snapshots
Conflicts:
	src/libcollections/string.rs
	src/libcollections/vec.rs
	src/snapshots.txt
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/bitflags.rs44
-rw-r--r--src/libstd/time/duration.rs64
2 files changed, 0 insertions, 108 deletions
diff --git a/src/libstd/bitflags.rs b/src/libstd/bitflags.rs
index d4ff05ce212..5dd76047779 100644
--- a/src/libstd/bitflags.rs
+++ b/src/libstd/bitflags.rs
@@ -205,17 +205,6 @@ macro_rules! bitflags {
             }
         }
 
-        // NOTE(stage0): Remove impl after a snapshot
-        #[cfg(stage0)]
-        impl BitOr<$BitFlags, $BitFlags> for $BitFlags {
-            /// Returns the union of the two sets of flags.
-            #[inline]
-            fn bitor(&self, other: &$BitFlags) -> $BitFlags {
-                $BitFlags { bits: self.bits | other.bits }
-            }
-        }
-
-        #[cfg(not(stage0))]  // NOTE(stage0): Remove cfg after a snapshot
         impl BitOr<$BitFlags, $BitFlags> for $BitFlags {
             /// Returns the union of the two sets of flags.
             #[inline]
@@ -224,17 +213,6 @@ macro_rules! bitflags {
             }
         }
 
-        // NOTE(stage0): Remove impl after a snapshot
-        #[cfg(stage0)]
-        impl BitXor<$BitFlags, $BitFlags> for $BitFlags {
-            /// Returns the left flags, but with all the right flags toggled.
-            #[inline]
-            fn bitxor(&self, other: &$BitFlags) -> $BitFlags {
-                $BitFlags { bits: self.bits ^ other.bits }
-            }
-        }
-
-        #[cfg(not(stage0))]  // NOTE(stage0): Remove cfg after a snapshot
         impl BitXor<$BitFlags, $BitFlags> for $BitFlags {
             /// Returns the left flags, but with all the right flags toggled.
             #[inline]
@@ -243,17 +221,6 @@ macro_rules! bitflags {
             }
         }
 
-        // NOTE(stage0): Remove impl after a snapshot
-        #[cfg(stage0)]
-        impl BitAnd<$BitFlags, $BitFlags> for $BitFlags {
-            /// Returns the intersection between the two sets of flags.
-            #[inline]
-            fn bitand(&self, other: &$BitFlags) -> $BitFlags {
-                $BitFlags { bits: self.bits & other.bits }
-            }
-        }
-
-        #[cfg(not(stage0))]  // NOTE(stage0): Remove cfg after a snapshot
         impl BitAnd<$BitFlags, $BitFlags> for $BitFlags {
             /// Returns the intersection between the two sets of flags.
             #[inline]
@@ -262,17 +229,6 @@ macro_rules! bitflags {
             }
         }
 
-        // NOTE(stage0): Remove impl after a snapshot
-        #[cfg(stage0)]
-        impl Sub<$BitFlags, $BitFlags> for $BitFlags {
-            /// Returns the set difference of the two sets of flags.
-            #[inline]
-            fn sub(&self, other: &$BitFlags) -> $BitFlags {
-                $BitFlags { bits: self.bits & !other.bits }
-            }
-        }
-
-        #[cfg(not(stage0))]  // NOTE(stage0): Remove cfg after a snapshot
         impl Sub<$BitFlags, $BitFlags> for $BitFlags {
             /// Returns the set difference of the two sets of flags.
             #[inline]
diff --git a/src/libstd/time/duration.rs b/src/libstd/time/duration.rs
index 7cb14e8e4bc..f7351c9580f 100644
--- a/src/libstd/time/duration.rs
+++ b/src/libstd/time/duration.rs
@@ -287,21 +287,6 @@ impl Neg<Duration> for Duration {
     }
 }
 
-// NOTE(stage0): Remove impl after a snapshot
-#[cfg(stage0)]
-impl Add<Duration,Duration> for Duration {
-    fn add(&self, rhs: &Duration) -> Duration {
-        let mut secs = self.secs + rhs.secs;
-        let mut nanos = self.nanos + rhs.nanos;
-        if nanos >= NANOS_PER_SEC {
-            nanos -= NANOS_PER_SEC;
-            secs += 1;
-        }
-        Duration { secs: secs, nanos: nanos }
-    }
-}
-
-#[cfg(not(stage0))]  // NOTE(stage0): Remove cfg after a snapshot
 impl Add<Duration, Duration> for Duration {
     fn add(self, rhs: Duration) -> Duration {
         let mut secs = self.secs + rhs.secs;
@@ -314,21 +299,6 @@ impl Add<Duration, Duration> for Duration {
     }
 }
 
-// NOTE(stage0): Remove impl after a snapshot
-#[cfg(stage0)]
-impl Sub<Duration,Duration> for Duration {
-    fn sub(&self, rhs: &Duration) -> Duration {
-        let mut secs = self.secs - rhs.secs;
-        let mut nanos = self.nanos - rhs.nanos;
-        if nanos < 0 {
-            nanos += NANOS_PER_SEC;
-            secs -= 1;
-        }
-        Duration { secs: secs, nanos: nanos }
-    }
-}
-
-#[cfg(not(stage0))]  // NOTE(stage0): Remove cfg after a snapshot
 impl Sub<Duration, Duration> for Duration {
     fn sub(self, rhs: Duration) -> Duration {
         let mut secs = self.secs - rhs.secs;
@@ -341,19 +311,6 @@ impl Sub<Duration, Duration> for Duration {
     }
 }
 
-// NOTE(stage0): Remove impl after a snapshot
-#[cfg(stage0)]
-impl Mul<i32,Duration> for Duration {
-    fn mul(&self, rhs: &i32) -> Duration {
-        // Multiply nanoseconds as i64, because it cannot overflow that way.
-        let total_nanos = self.nanos as i64 * *rhs as i64;
-        let (extra_secs, nanos) = div_mod_floor_64(total_nanos, NANOS_PER_SEC as i64);
-        let secs = self.secs * *rhs as i64 + extra_secs;
-        Duration { secs: secs, nanos: nanos as i32 }
-    }
-}
-
-#[cfg(not(stage0))]  // NOTE(stage0): Remove cfg after a snapshot
 impl Mul<i32, Duration> for Duration {
     fn mul(self, rhs: i32) -> Duration {
         // Multiply nanoseconds as i64, because it cannot overflow that way.
@@ -364,27 +321,6 @@ impl Mul<i32, Duration> for Duration {
     }
 }
 
-// NOTE(stage0): Remove impl after a snapshot
-#[cfg(stage0)]
-impl Div<i32,Duration> for Duration {
-    fn div(&self, rhs: &i32) -> Duration {
-        let mut secs = self.secs / *rhs as i64;
-        let carry = self.secs - secs * *rhs as i64;
-        let extra_nanos = carry * NANOS_PER_SEC as i64 / *rhs as i64;
-        let mut nanos = self.nanos / *rhs + extra_nanos as i32;
-        if nanos >= NANOS_PER_SEC {
-            nanos -= NANOS_PER_SEC;
-            secs += 1;
-        }
-        if nanos < 0 {
-            nanos += NANOS_PER_SEC;
-            secs -= 1;
-        }
-        Duration { secs: secs, nanos: nanos }
-    }
-}
-
-#[cfg(not(stage0))]  // NOTE(stage0): Remove cfg after a snapshot
 impl Div<i32, Duration> for Duration {
     fn div(self, rhs: i32) -> Duration {
         let mut secs = self.secs / rhs as i64;