diff --git a/src/length.rs b/src/length.rs index 726fd3a..393df56 100644 --- a/src/length.rs +++ b/src/length.rs @@ -26,7 +26,7 @@ use std::ops::{Add, Sub, Mul, Div, Neg}; /// /// You can multiply a Length by a `scale_factor::ScaleFactor` to convert it from one unit to /// another. See the ScaleFactor docs for an example. -#[derive(Copy, RustcDecodable, RustcEncodable, Show)] +#[derive(Copy, RustcDecodable, RustcEncodable, Debug)] pub struct Length(pub T); impl Length { @@ -124,9 +124,9 @@ mod tests { use scale_factor::ScaleFactor; use std::num::Zero; - #[derive(Show)] + #[derive(Debug)] enum Inch {} - #[derive(Show)] + #[derive(Debug)] enum Mm {} #[test] diff --git a/src/lib.rs b/src/lib.rs index 887f1bd..4d67004 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -11,7 +11,7 @@ #![crate_type = "rlib"] #![feature(asm, simd)] -#![allow(unstable)] +#![feature(core, rustc_private, rand, hash, test)] #[macro_use] extern crate log; diff --git a/src/matrix.rs b/src/matrix.rs index 71323c7..b09b44d 100644 --- a/src/matrix.rs +++ b/src/matrix.rs @@ -28,7 +28,7 @@ pub fn Matrix4 + Clone + ApproxEq + Mul + One } } -#[derive(Show, Copy)] +#[derive(Debug, Copy)] pub struct Matrix4 { pub m11: T, pub m12: T, pub m13: T, pub m14: T, pub m21: T, pub m22: T, pub m23: T, pub m24: T, diff --git a/src/point.rs b/src/point.rs index 62b1213..06d2c07 100644 --- a/src/point.rs +++ b/src/point.rs @@ -27,7 +27,7 @@ impl Point2D { } } -impl fmt::Show for Point2D { +impl fmt::Debug for Point2D { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "({:?},{:?})", self.x, self.y) } diff --git a/src/rect.rs b/src/rect.rs index b16d1f5..8e3996d 100644 --- a/src/rect.rs +++ b/src/rect.rs @@ -23,7 +23,7 @@ pub struct Rect { pub size: Size2D, } -impl fmt::Show for Rect { +impl fmt::Debug for Rect { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "Rect({:?} at {:?})", self.size, self.origin) } diff --git a/src/scale_factor.rs b/src/scale_factor.rs index 73845a2..69acb6b 100644 --- a/src/scale_factor.rs +++ b/src/scale_factor.rs @@ -31,7 +31,7 @@ use std::ops::{Add, Mul, Sub, Div}; /// let one_foot: Length = Length(12.0); /// let one_foot_in_mm: Length = one_foot * mm_per_inch; /// ``` -#[derive(Copy, RustcDecodable, RustcEncodable, Show)] +#[derive(Copy, RustcDecodable, RustcEncodable, Debug)] pub struct ScaleFactor(pub T); impl ScaleFactor { @@ -104,11 +104,11 @@ impl Clone for ScaleFactor { mod tests { use super::ScaleFactor; - #[derive(Show)] + #[derive(Debug)] enum Inch {} - #[derive(Show)] + #[derive(Debug)] enum Cm {} - #[derive(Show)] + #[derive(Debug)] enum Mm {} #[test] diff --git a/src/size.rs b/src/size.rs index 9377cfc..75740b2 100644 --- a/src/size.rs +++ b/src/size.rs @@ -20,7 +20,7 @@ pub struct Size2D { pub height: T } -impl fmt::Show for Size2D { +impl fmt::Debug for Size2D { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{:?}×{:?}", self.width, self.height) }