Update to the last rust-nightly.

Version of rustc: 0.11.0-pre-nightly (918dbfe 2014-06-02 20:51:30 -0700).
This commit is contained in:
Sébastien Crozet 2014-06-03 22:37:46 +02:00
parent f6c597f102
commit 5066d6b9de
9 changed files with 27 additions and 27 deletions

View File

@ -105,13 +105,13 @@ pub fn clamp<T: cmp::PartialOrd>(val: T, min: T, max: T) -> T {
/// Same as `cmp::max`.
#[inline(always)]
pub fn max<T: TotalOrd>(a: T, b: T) -> T {
pub fn max<T: Ord>(a: T, b: T) -> T {
cmp::max(a, b)
}
/// Same as `cmp::min`.
#[inline(always)]
pub fn min<T: TotalOrd>(a: T, b: T) -> T {
pub fn min<T: Ord>(a: T, b: T) -> T {
cmp::min(a, b)
}

View File

@ -14,7 +14,7 @@ use std::fmt::{Show, Formatter, Result};
/// Matrix with dimensions unknown at compile-time.
#[deriving(TotalEq, PartialEq, Clone)]
#[deriving(Eq, PartialEq, Clone)]
pub struct DMat<N> {
nrows: uint,
ncols: uint,

View File

@ -12,7 +12,7 @@ use traits::geometry::{Dot, Norm};
use traits::structure::{Iterable, IterableMut, Indexable};
/// Vector with a dimension unknown at compile-time.
#[deriving(TotalEq, PartialEq, Show, Clone)]
#[deriving(Eq, PartialEq, Show, Clone)]
pub struct DVec<N> {
/// Components of the vector. Contains as much elements as the vector dimension.
pub at: Vec<N>

View File

@ -18,7 +18,7 @@ use structs::rot::{Rot2, Rot3, Rot4};
///
/// This is the composition of a rotation followed by a translation.
/// Isometries conserve angles and distances, hence do not allow shearing nor scaling.
#[deriving(TotalEq, PartialEq, Encodable, Decodable, Clone, Show)]
#[deriving(Eq, PartialEq, Encodable, Decodable, Clone, Show)]
pub struct Iso2<N> {
/// The rotation applicable by this isometry.
pub rotation: Rot2<N>,
@ -30,7 +30,7 @@ pub struct Iso2<N> {
///
/// This is the composition of a rotation followed by a translation.
/// Isometries conserve angles and distances, hence do not allow shearing nor scaling.
#[deriving(TotalEq, PartialEq, Encodable, Decodable, Clone, Show)]
#[deriving(Eq, PartialEq, Encodable, Decodable, Clone, Show)]
pub struct Iso3<N> {
/// The rotation applicable by this isometry.
pub rotation: Rot3<N>,
@ -41,7 +41,7 @@ pub struct Iso3<N> {
/// Four dimensional isometry.
///
/// Isometries conserve angles and distances, hence do not allow shearing nor scaling.
#[deriving(TotalEq, PartialEq, Encodable, Decodable, Clone, Show)]
#[deriving(Eq, PartialEq, Encodable, Decodable, Clone, Show)]
pub struct Iso4<N> {
/// The rotation applicable by this isometry.
pub rotation: Rot4<N>,

View File

@ -17,7 +17,7 @@ use traits::geometry::{ToHomogeneous, FromHomogeneous};
/// Special identity matrix. All its operation are no-ops.
#[deriving(TotalEq, PartialEq, Decodable, Clone, Rand, Show)]
#[deriving(Eq, PartialEq, Decodable, Clone, Rand, Show)]
pub struct Identity;
impl Identity {
@ -29,7 +29,7 @@ impl Identity {
}
/// Square matrix of dimension 1.
#[deriving(TotalEq, PartialEq, Encodable, Decodable, Clone, Hash, Rand, Zero, Show)]
#[deriving(Eq, PartialEq, Encodable, Decodable, Clone, Hash, Rand, Zero, Show)]
pub struct Mat1<N> {
pub m11: N
}
@ -125,7 +125,7 @@ from_homogeneous_impl!(Mat1, Mat2, 1, 2)
outer_impl!(Vec1, Mat1)
/// Square matrix of dimension 2.
#[deriving(TotalEq, PartialEq, Encodable, Decodable, Clone, Hash, Rand, Zero, Show)]
#[deriving(Eq, PartialEq, Encodable, Decodable, Clone, Hash, Rand, Zero, Show)]
pub struct Mat2<N> {
pub m11: N, pub m21: N,
pub m12: N, pub m22: N
@ -226,7 +226,7 @@ from_homogeneous_impl!(Mat2, Mat3, 2, 3)
outer_impl!(Vec2, Mat2)
/// Square matrix of dimension 3.
#[deriving(TotalEq, PartialEq, Encodable, Decodable, Clone, Hash, Rand, Zero, Show)]
#[deriving(Eq, PartialEq, Encodable, Decodable, Clone, Hash, Rand, Zero, Show)]
pub struct Mat3<N> {
pub m11: N, pub m21: N, pub m31: N,
pub m12: N, pub m22: N, pub m32: N,
@ -341,7 +341,7 @@ from_homogeneous_impl!(Mat3, Mat4, 3, 4)
outer_impl!(Vec3, Mat3)
/// Square matrix of dimension 4.
#[deriving(TotalEq, PartialEq, Encodable, Decodable, Clone, Hash, Rand, Zero, Show)]
#[deriving(Eq, PartialEq, Encodable, Decodable, Clone, Hash, Rand, Zero, Show)]
pub struct Mat4<N> {
pub m11: N, pub m21: N, pub m31: N, pub m41: N,
pub m12: N, pub m22: N, pub m32: N, pub m42: N,
@ -508,7 +508,7 @@ from_homogeneous_impl!(Mat4, Mat5, 4, 5)
outer_impl!(Vec4, Mat4)
/// Square matrix of dimension 5.
#[deriving(TotalEq, PartialEq, Encodable, Decodable, Clone, Hash, Rand, Zero, Show)]
#[deriving(Eq, PartialEq, Encodable, Decodable, Clone, Hash, Rand, Zero, Show)]
pub struct Mat5<N> {
pub m11: N, pub m21: N, pub m31: N, pub m41: N, pub m51: N,
pub m12: N, pub m22: N, pub m32: N, pub m42: N, pub m52: N,
@ -691,7 +691,7 @@ from_homogeneous_impl!(Mat5, Mat6, 5, 6)
outer_impl!(Vec5, Mat5)
/// Square matrix of dimension 6.
#[deriving(TotalEq, PartialEq, Encodable, Decodable, Clone, Hash, Rand, Zero, Show)]
#[deriving(Eq, PartialEq, Encodable, Decodable, Clone, Hash, Rand, Zero, Show)]
pub struct Mat6<N> {
pub m11: N, pub m21: N, pub m31: N, pub m41: N, pub m51: N, pub m61: N,
pub m12: N, pub m22: N, pub m32: N, pub m42: N, pub m52: N, pub m62: N,

View File

@ -13,7 +13,7 @@ use structs::mat::{Mat2, Mat3, Mat4, Mat5};
/// Two dimensional rotation matrix.
#[deriving(TotalEq, PartialEq, Encodable, Decodable, Clone, Show, Hash)]
#[deriving(Eq, PartialEq, Encodable, Decodable, Clone, Show, Hash)]
pub struct Rot2<N> {
submat: Mat2<N>
}
@ -91,7 +91,7 @@ impl<N: Signed> AbsoluteRotate<Vec2<N>> for Rot2<N> {
* 3d rotation
*/
/// Three dimensional rotation matrix.
#[deriving(TotalEq, PartialEq, Encodable, Decodable, Clone, Show, Hash)]
#[deriving(Eq, PartialEq, Encodable, Decodable, Clone, Show, Hash)]
pub struct Rot3<N> {
submat: Mat3<N>
}
@ -262,7 +262,7 @@ impl<N: Signed> AbsoluteRotate<Vec3<N>> for Rot3<N> {
}
/// Four dimensional rotation matrix.
#[deriving(TotalEq, PartialEq, Encodable, Decodable, Clone, Show, Hash)]
#[deriving(Eq, PartialEq, Encodable, Decodable, Clone, Show, Hash)]
pub struct Rot4<N> {
submat: Mat4<N>
}

View File

@ -14,11 +14,11 @@ use traits::structure::{Basis, Cast, Dim, Indexable, Iterable, IterableMut};
/// Vector of dimension 0.
#[deriving(TotalEq, PartialEq, Decodable, Clone, Rand, Zero, Show)]
#[deriving(Eq, PartialEq, Decodable, Clone, Rand, Zero, Show)]
pub struct Vec0<N>;
/// Vector of dimension 1.
#[deriving(TotalEq, PartialEq, Encodable, Decodable, Clone, Hash, Rand, Zero, Show)]
#[deriving(Eq, PartialEq, Encodable, Decodable, Clone, Hash, Rand, Zero, Show)]
pub struct Vec1<N> {
/// First component of the vector.
pub x: N
@ -113,7 +113,7 @@ rotate_impl!(Vec1)
transform_impl!(Vec1)
/// Vector of dimension 2.
#[deriving(TotalEq, PartialEq, Encodable, Decodable, Clone, Hash, Rand, Zero, Show)]
#[deriving(Eq, PartialEq, Encodable, Decodable, Clone, Hash, Rand, Zero, Show)]
pub struct Vec2<N> {
/// First component of the vector.
pub x: N,
@ -210,7 +210,7 @@ rotate_impl!(Vec2)
transform_impl!(Vec2)
/// Vector of dimension 3.
#[deriving(TotalEq, PartialEq, Encodable, Decodable, Clone, Hash, Rand, Zero, Show)]
#[deriving(Eq, PartialEq, Encodable, Decodable, Clone, Hash, Rand, Zero, Show)]
pub struct Vec3<N> {
/// First component of the vector.
pub x: N,
@ -313,7 +313,7 @@ transform_impl!(Vec3)
/// Vector of dimension 4.
#[deriving(TotalEq, PartialEq, Encodable, Decodable, Clone, Hash, Rand, Zero, Show)]
#[deriving(Eq, PartialEq, Encodable, Decodable, Clone, Hash, Rand, Zero, Show)]
pub struct Vec4<N> {
/// First component of the vector.
pub x: N,
@ -414,7 +414,7 @@ rotate_impl!(Vec4)
transform_impl!(Vec4)
/// Vector of dimension 5.
#[deriving(TotalEq, PartialEq, Encodable, Decodable, Clone, Hash, Rand, Zero, Show)]
#[deriving(Eq, PartialEq, Encodable, Decodable, Clone, Hash, Rand, Zero, Show)]
pub struct Vec5<N> {
/// First component of the vector.
pub x: N,
@ -517,7 +517,7 @@ rotate_impl!(Vec5)
transform_impl!(Vec5)
/// Vector of dimension 6.
#[deriving(TotalEq, PartialEq, Encodable, Decodable, Clone, Hash, Rand, Zero, Show)]
#[deriving(Eq, PartialEq, Encodable, Decodable, Clone, Hash, Rand, Zero, Show)]
pub struct Vec6<N> {
/// First component of the vector.
pub x: N,

View File

@ -34,8 +34,8 @@ macro_rules! at_fast_impl(
)
)
// FIXME: N should be bounded by TotalOrd instead of Float…
// However, f32/f64 does not implement TotalOrd…
// FIXME: N should be bounded by Ord instead of Float…
// However, f32/f64 does not implement Ord…
macro_rules! ord_impl(
($t: ident, $comp0: ident $(,$compN: ident)*) => (
impl<N: FloatMath + Clone> PartialOrd for $t<N> {

View File

@ -3,7 +3,7 @@
/// Result of a partial ordering.
#[deriving(TotalEq, PartialEq, Encodable, Decodable, Clone, Show)]
#[deriving(Eq, PartialEq, Encodable, Decodable, Clone, Show)]
pub enum PartialOrdering {
/// Result of a strict comparison.
PartialLess,