1
Fork 0

Register new snapshots

Lots of cruft to remove!
This commit is contained in:
Alex Crichton 2015-12-11 13:07:11 -08:00
parent e2834a20e7
commit cd1848a1a6
60 changed files with 45 additions and 841 deletions

View file

@ -441,7 +441,6 @@ macro_rules! rem_impl_integer {
rem_impl_integer! { usize u8 u16 u32 u64 isize i8 i16 i32 i64 }
#[cfg(not(stage0))]
macro_rules! rem_impl_float {
($($t:ty)*) => ($(
#[stable(feature = "rust1", since = "1.0.0")]
@ -456,48 +455,8 @@ macro_rules! rem_impl_float {
)*)
}
#[cfg(not(stage0))]
rem_impl_float! { f32 f64 }
#[stable(feature = "rust1", since = "1.0.0")]
#[cfg(stage0)]
impl Rem for f32 {
type Output = f32;
// The builtin f32 rem operator is broken when targeting
// MSVC; see comment in std::f32::floor.
// FIXME: See also #27859.
#[inline]
#[cfg(target_env = "msvc")]
fn rem(self, other: f32) -> f32 {
(self as f64).rem(other as f64) as f32
}
#[inline]
#[cfg(not(target_env = "msvc"))]
fn rem(self, other: f32) -> f32 {
extern { fn fmodf(a: f32, b: f32) -> f32; }
unsafe { fmodf(self, other) }
}
}
#[stable(feature = "rust1", since = "1.0.0")]
#[cfg(stage0)]
impl Rem for f64 {
type Output = f64;
#[inline]
fn rem(self, other: f64) -> f64 {
extern { fn fmod(a: f64, b: f64) -> f64; }
unsafe { fmod(self, other) }
}
}
#[cfg(stage0)]
forward_ref_binop! { impl Rem, rem for f64, f64 }
#[cfg(stage0)]
forward_ref_binop! { impl Rem, rem for f32, f32 }
/// The `Neg` trait is used to specify the functionality of unary `-`.
///
/// # Examples
@ -954,7 +913,6 @@ shr_impl_all! { u8 u16 u32 u64 usize i8 i16 i32 i64 isize }
/// foo += Foo;
/// }
/// ```
#[cfg(not(stage0))]
#[lang = "add_assign"]
#[unstable(feature = "op_assign_traits", reason = "recently added", issue = "28235")]
pub trait AddAssign<Rhs=Self> {
@ -962,7 +920,6 @@ pub trait AddAssign<Rhs=Self> {
fn add_assign(&mut self, Rhs);
}
#[cfg(not(stage0))]
macro_rules! add_assign_impl {
($($t:ty)+) => ($(
#[unstable(feature = "op_assign_traits", reason = "recently added", issue = "28235")]
@ -973,7 +930,6 @@ macro_rules! add_assign_impl {
)+)
}
#[cfg(not(stage0))]
add_assign_impl! { usize u8 u16 u32 u64 isize i8 i16 i32 i64 f32 f64 }
/// The `SubAssign` trait is used to specify the functionality of `-=`.
@ -1004,7 +960,6 @@ add_assign_impl! { usize u8 u16 u32 u64 isize i8 i16 i32 i64 f32 f64 }
/// foo -= Foo;
/// }
/// ```
#[cfg(not(stage0))]
#[lang = "sub_assign"]
#[unstable(feature = "op_assign_traits", reason = "recently added", issue = "28235")]
pub trait SubAssign<Rhs=Self> {
@ -1012,7 +967,6 @@ pub trait SubAssign<Rhs=Self> {
fn sub_assign(&mut self, Rhs);
}
#[cfg(not(stage0))]
macro_rules! sub_assign_impl {
($($t:ty)+) => ($(
#[unstable(feature = "op_assign_traits", reason = "recently added", issue = "28235")]
@ -1023,7 +977,6 @@ macro_rules! sub_assign_impl {
)+)
}
#[cfg(not(stage0))]
sub_assign_impl! { usize u8 u16 u32 u64 isize i8 i16 i32 i64 f32 f64 }
/// The `MulAssign` trait is used to specify the functionality of `*=`.
@ -1054,7 +1007,6 @@ sub_assign_impl! { usize u8 u16 u32 u64 isize i8 i16 i32 i64 f32 f64 }
/// foo *= Foo;
/// }
/// ```
#[cfg(not(stage0))]
#[lang = "mul_assign"]
#[unstable(feature = "op_assign_traits", reason = "recently added", issue = "28235")]
pub trait MulAssign<Rhs=Self> {
@ -1062,7 +1014,6 @@ pub trait MulAssign<Rhs=Self> {
fn mul_assign(&mut self, Rhs);
}
#[cfg(not(stage0))]
macro_rules! mul_assign_impl {
($($t:ty)+) => ($(
#[unstable(feature = "op_assign_traits", reason = "recently added", issue = "28235")]
@ -1073,7 +1024,6 @@ macro_rules! mul_assign_impl {
)+)
}
#[cfg(not(stage0))]
mul_assign_impl! { usize u8 u16 u32 u64 isize i8 i16 i32 i64 f32 f64 }
/// The `DivAssign` trait is used to specify the functionality of `/=`.
@ -1104,7 +1054,6 @@ mul_assign_impl! { usize u8 u16 u32 u64 isize i8 i16 i32 i64 f32 f64 }
/// foo /= Foo;
/// }
/// ```
#[cfg(not(stage0))]
#[lang = "div_assign"]
#[unstable(feature = "op_assign_traits", reason = "recently added", issue = "28235")]
pub trait DivAssign<Rhs=Self> {
@ -1112,7 +1061,6 @@ pub trait DivAssign<Rhs=Self> {
fn div_assign(&mut self, Rhs);
}
#[cfg(not(stage0))]
macro_rules! div_assign_impl {
($($t:ty)+) => ($(
#[unstable(feature = "op_assign_traits", reason = "recently added", issue = "28235")]
@ -1123,7 +1071,6 @@ macro_rules! div_assign_impl {
)+)
}
#[cfg(not(stage0))]
div_assign_impl! { usize u8 u16 u32 u64 isize i8 i16 i32 i64 f32 f64 }
/// The `RemAssign` trait is used to specify the functionality of `%=`.
@ -1154,7 +1101,6 @@ div_assign_impl! { usize u8 u16 u32 u64 isize i8 i16 i32 i64 f32 f64 }
/// foo %= Foo;
/// }
/// ```
#[cfg(not(stage0))]
#[lang = "rem_assign"]
#[unstable(feature = "op_assign_traits", reason = "recently added", issue = "28235")]
pub trait RemAssign<Rhs=Self> {
@ -1162,7 +1108,6 @@ pub trait RemAssign<Rhs=Self> {
fn rem_assign(&mut self, Rhs);
}
#[cfg(not(stage0))]
macro_rules! rem_assign_impl {
($($t:ty)+) => ($(
#[unstable(feature = "op_assign_traits", reason = "recently added", issue = "28235")]
@ -1173,7 +1118,6 @@ macro_rules! rem_assign_impl {
)+)
}
#[cfg(not(stage0))]
rem_assign_impl! { usize u8 u16 u32 u64 isize i8 i16 i32 i64 f32 f64 }
/// The `BitAndAssign` trait is used to specify the functionality of `&=`.
@ -1204,7 +1148,6 @@ rem_assign_impl! { usize u8 u16 u32 u64 isize i8 i16 i32 i64 f32 f64 }
/// foo &= Foo;
/// }
/// ```
#[cfg(not(stage0))]
#[lang = "bitand_assign"]
#[unstable(feature = "op_assign_traits", reason = "recently added", issue = "28235")]
pub trait BitAndAssign<Rhs=Self> {
@ -1212,7 +1155,6 @@ pub trait BitAndAssign<Rhs=Self> {
fn bitand_assign(&mut self, Rhs);
}
#[cfg(not(stage0))]
macro_rules! bitand_assign_impl {
($($t:ty)+) => ($(
#[unstable(feature = "op_assign_traits", reason = "recently added", issue = "28235")]
@ -1223,7 +1165,6 @@ macro_rules! bitand_assign_impl {
)+)
}
#[cfg(not(stage0))]
bitand_assign_impl! { bool usize u8 u16 u32 u64 isize i8 i16 i32 i64 }
/// The `BitOrAssign` trait is used to specify the functionality of `|=`.
@ -1254,7 +1195,6 @@ bitand_assign_impl! { bool usize u8 u16 u32 u64 isize i8 i16 i32 i64 }
/// foo |= Foo;
/// }
/// ```
#[cfg(not(stage0))]
#[lang = "bitor_assign"]
#[unstable(feature = "op_assign_traits", reason = "recently added", issue = "28235")]
pub trait BitOrAssign<Rhs=Self> {
@ -1262,7 +1202,6 @@ pub trait BitOrAssign<Rhs=Self> {
fn bitor_assign(&mut self, Rhs);
}
#[cfg(not(stage0))]
macro_rules! bitor_assign_impl {
($($t:ty)+) => ($(
#[unstable(feature = "op_assign_traits", reason = "recently added", issue = "28235")]
@ -1273,7 +1212,6 @@ macro_rules! bitor_assign_impl {
)+)
}
#[cfg(not(stage0))]
bitor_assign_impl! { bool usize u8 u16 u32 u64 isize i8 i16 i32 i64 }
/// The `BitXorAssign` trait is used to specify the functionality of `^=`.
@ -1304,7 +1242,6 @@ bitor_assign_impl! { bool usize u8 u16 u32 u64 isize i8 i16 i32 i64 }
/// foo ^= Foo;
/// }
/// ```
#[cfg(not(stage0))]
#[lang = "bitxor_assign"]
#[unstable(feature = "op_assign_traits", reason = "recently added", issue = "28235")]
pub trait BitXorAssign<Rhs=Self> {
@ -1312,7 +1249,6 @@ pub trait BitXorAssign<Rhs=Self> {
fn bitxor_assign(&mut self, Rhs);
}
#[cfg(not(stage0))]
macro_rules! bitxor_assign_impl {
($($t:ty)+) => ($(
#[unstable(feature = "op_assign_traits", reason = "recently added", issue = "28235")]
@ -1323,7 +1259,6 @@ macro_rules! bitxor_assign_impl {
)+)
}
#[cfg(not(stage0))]
bitxor_assign_impl! { bool usize u8 u16 u32 u64 isize i8 i16 i32 i64 }
/// The `ShlAssign` trait is used to specify the functionality of `<<=`.
@ -1354,7 +1289,6 @@ bitxor_assign_impl! { bool usize u8 u16 u32 u64 isize i8 i16 i32 i64 }
/// foo <<= Foo;
/// }
/// ```
#[cfg(not(stage0))]
#[lang = "shl_assign"]
#[unstable(feature = "op_assign_traits", reason = "recently added", issue = "28235")]
pub trait ShlAssign<Rhs> {
@ -1362,7 +1296,6 @@ pub trait ShlAssign<Rhs> {
fn shl_assign(&mut self, Rhs);
}
#[cfg(not(stage0))]
macro_rules! shl_assign_impl {
($t:ty, $f:ty) => (
#[unstable(feature = "op_assign_traits", reason = "recently added", issue = "28235")]
@ -1375,7 +1308,6 @@ macro_rules! shl_assign_impl {
)
}
#[cfg(not(stage0))]
macro_rules! shl_assign_impl_all {
($($t:ty)*) => ($(
shl_assign_impl! { $t, u8 }
@ -1392,7 +1324,6 @@ macro_rules! shl_assign_impl_all {
)*)
}
#[cfg(not(stage0))]
shl_assign_impl_all! { u8 u16 u32 u64 usize i8 i16 i32 i64 isize }
/// The `ShrAssign` trait is used to specify the functionality of `>>=`.
@ -1423,7 +1354,6 @@ shl_assign_impl_all! { u8 u16 u32 u64 usize i8 i16 i32 i64 isize }
/// foo >>= Foo;
/// }
/// ```
#[cfg(not(stage0))]
#[lang = "shr_assign"]
#[unstable(feature = "op_assign_traits", reason = "recently added", issue = "28235")]
pub trait ShrAssign<Rhs=Self> {
@ -1431,7 +1361,6 @@ pub trait ShrAssign<Rhs=Self> {
fn shr_assign(&mut self, Rhs);
}
#[cfg(not(stage0))]
macro_rules! shr_assign_impl {
($t:ty, $f:ty) => (
#[unstable(feature = "op_assign_traits", reason = "recently added", issue = "28235")]
@ -1444,7 +1373,6 @@ macro_rules! shr_assign_impl {
)
}
#[cfg(not(stage0))]
macro_rules! shr_assign_impl_all {
($($t:ty)*) => ($(
shr_assign_impl! { $t, u8 }
@ -1461,7 +1389,6 @@ macro_rules! shr_assign_impl_all {
)*)
}
#[cfg(not(stage0))]
shr_assign_impl_all! { u8 u16 u32 u64 usize i8 i16 i32 i64 isize }
/// The `Index` trait is used to specify the functionality of indexing operations