diff --git a/src/mat.rs b/src/mat.rs index 5247937..5a177c1 100644 --- a/src/mat.rs +++ b/src/mat.rs @@ -245,7 +245,7 @@ pub trait MutableMatrix: Matrix { * * A mutable reference to the column at `i` */ - fn col_mut(&mut self, i: uint) -> &self/mut V; + fn col_mut(&mut self, i: uint) -> &'self mut V; /** * Swap two columns of the matrix in place diff --git a/src/mat2.rs b/src/mat2.rs index 9e6fb8d..245bcc2 100644 --- a/src/mat2.rs +++ b/src/mat2.rs @@ -210,7 +210,7 @@ impl + Add + Sub + Mul + Div + N impl + Add + Sub + Mul + Div + Neg> MutableMatrix > for Mat2 { #[inline(always)] - fn col_mut(&mut self, i: uint) -> &self/mut Vec2 { + fn col_mut(&mut self, i: uint) -> &'self mut Vec2 { match i { 0 => &mut self.x, 1 => &mut self.y, diff --git a/src/mat3.rs b/src/mat3.rs index 0b17902..347eeef 100644 --- a/src/mat3.rs +++ b/src/mat3.rs @@ -477,7 +477,7 @@ impl + Add + Sub + Mul + Div + N impl + Add + Sub + Mul + Div + Neg> MutableMatrix> for Mat3 { #[inline(always)] - fn col_mut(&mut self, i: uint) -> &self/mut Vec3 { + fn col_mut(&mut self, i: uint) -> &'self mut Vec3 { match i { 0 => &mut self.x, 1 => &mut self.y, diff --git a/src/mat4.rs b/src/mat4.rs index de354f5..b4283db 100644 --- a/src/mat4.rs +++ b/src/mat4.rs @@ -401,7 +401,7 @@ impl + Add + Sub + Mul + Div + N impl + Add + Sub + Mul + Div + Neg> MutableMatrix> for Mat4 { #[inline(always)] - fn col_mut(&mut self, i: uint) -> &self/mut Vec4 { + fn col_mut(&mut self, i: uint) -> &'self mut Vec4 { match i { 0 => &mut self.x, 1 => &mut self.y, diff --git a/src/vec.rs b/src/vec.rs index fed64f6..4a44bf9 100644 --- a/src/vec.rs +++ b/src/vec.rs @@ -35,7 +35,7 @@ pub trait MutableVector: Vector { /** * Get a mutable reference to the component at `i` */ - fn index_mut(&mut self, i: uint) -> &self/mut T; + fn index_mut(&mut self, i: uint) -> &'self mut T; /** * Swap two components of the vector in place @@ -179,7 +179,7 @@ pub trait NumericVector4: NumericVector { /** * A mutable vector with numeric components */ -pub trait MutableNumericVector: MutableVector<&self/T> + +pub trait MutableNumericVector: MutableVector<&'self T> + NumericVector { /** * Negate the vector @@ -220,7 +220,7 @@ pub trait MutableNumericVector: MutableVector<&self/T> + /** * A mutable 3-dimensional vector with numeric components */ -pub trait MutableNumericVector3: MutableNumericVector<&self/T> { +pub trait MutableNumericVector3: MutableNumericVector<&'self T> { /** * Set to the cross product of the vector and `other` */ @@ -313,7 +313,7 @@ pub trait EuclideanVector: NumericVector { * * * `T` - The type of the components. This should be a floating point type. */ -pub trait MutableEuclideanVector: MutableNumericVector<&self/T> + +pub trait MutableEuclideanVector: MutableNumericVector<&'self T> + EuclideanVector { /** * Normalize the vector diff --git a/src/vec2.rs b/src/vec2.rs index eacae0c..27c7e58 100644 --- a/src/vec2.rs +++ b/src/vec2.rs @@ -75,7 +75,7 @@ impl Index for Vec2 { impl MutableVector for Vec2 { #[inline(always)] - fn index_mut(&mut self, i: uint) -> &self/mut T { + fn index_mut(&mut self, i: uint) -> &'self mut T { match i { 0 => &mut self.x, 1 => &mut self.y, @@ -174,7 +174,7 @@ impl + Sub + Mul + Div + Neg> Numer } } -impl + Sub + Mul + Div + Neg> MutableNumericVector<&self/T> for Vec2 { +impl + Sub + Mul + Div + Neg> MutableNumericVector<&'self T> for Vec2 { #[inline(always)] fn neg_self(&mut self) { *self.index_mut(0) = -*self.index_mut(0); @@ -267,7 +267,7 @@ impl + Sub + Mul + Div + Neg> Euclid } } -impl + Sub + Mul + Div + Neg> MutableEuclideanVector<&self/T> for Vec2 { +impl + Sub + Mul + Div + Neg> MutableEuclideanVector<&'self T> for Vec2 { #[inline(always)] fn normalize_self(&mut self) { let n = one::() / self.length(); diff --git a/src/vec3.rs b/src/vec3.rs index 167bff6..606fd98 100644 --- a/src/vec3.rs +++ b/src/vec3.rs @@ -77,7 +77,7 @@ impl Index for Vec3 { impl MutableVector for Vec3 { #[inline(always)] - fn index_mut(&mut self, i: uint) -> &self/mut T { + fn index_mut(&mut self, i: uint) -> &'self mut T { match i { 0 => &mut self.x, 1 => &mut self.y, @@ -192,7 +192,7 @@ impl + Sub + Mul + Div + Neg> Numer } } -impl + Sub + Mul + Div + Neg> MutableNumericVector<&self/T> for Vec3 { +impl + Sub + Mul + Div + Neg> MutableNumericVector<&'self T> for Vec3 { #[inline(always)] fn neg_self(&mut self) { *self.index_mut(0) = -*self.index_mut(0); @@ -243,7 +243,7 @@ impl + Sub + Mul + Div + Neg> Mutab } } -impl + Sub + Mul + Div + Neg> MutableNumericVector3<&self/T> for Vec3 { +impl + Sub + Mul + Div + Neg> MutableNumericVector3<&'self T> for Vec3 { #[inline(always)] fn cross_self(&mut self, other: &Vec3) { *self = self.cross(other); @@ -299,7 +299,7 @@ impl + Sub + Mul + Div + Neg> Euclid } } -impl + Sub + Mul + Div + Neg> MutableEuclideanVector<&self/T> for Vec3 { +impl + Sub + Mul + Div + Neg> MutableEuclideanVector<&'self T> for Vec3 { #[inline(always)] fn normalize_self(&mut self) { let n = one::() / self.length(); diff --git a/src/vec4.rs b/src/vec4.rs index ee247f5..4bbae87 100644 --- a/src/vec4.rs +++ b/src/vec4.rs @@ -75,7 +75,7 @@ impl Index for Vec4 { impl MutableVector for Vec4 { #[inline(always)] - fn index_mut(&mut self, i: uint) -> &self/mut T { + fn index_mut(&mut self, i: uint) -> &'self mut T { match i { 0 => &mut self.x, 1 => &mut self.y, @@ -197,7 +197,7 @@ impl NumericVector4 for Vec4 { } } -impl + Sub + Mul + Div + Neg> MutableNumericVector<&self/T> for Vec4 { +impl + Sub + Mul + Div + Neg> MutableNumericVector<&'self T> for Vec4 { #[inline(always)] fn neg_self(&mut self) { *self.index_mut(0) = -*self.index_mut(0); @@ -297,7 +297,7 @@ impl + Sub + Mul + Div + Neg> Euclid } } -impl + Sub + Mul + Div + Neg> MutableEuclideanVector<&self/T> for Vec4 { +impl + Sub + Mul + Div + Neg> MutableEuclideanVector<&'self T> for Vec4 { #[inline(always)] fn normalize_self(&mut self) { let n = one::() / self.length();