From 94168df474cbc36f25265f7e85f99813e1683c28 Mon Sep 17 00:00:00 2001 From: Manish Goregaokar Date: Sat, 31 Jan 2015 16:25:44 +0530 Subject: [PATCH 1/2] Remove old impl check --- src/lib.rs | 2 +- src/rect.rs | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index f4a76ef..db27eeb 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -10,7 +10,7 @@ #![crate_name = "geom"] #![crate_type = "rlib"] -#![feature(asm, simd, old_impl_check)] +#![feature(asm, simd)] #[macro_use] extern crate log; diff --git a/src/rect.rs b/src/rect.rs index e4ea9bc..b16d1f5 100644 --- a/src/rect.rs +++ b/src/rect.rs @@ -123,10 +123,10 @@ impl + Sub> Rect } } -#[old_impl_check] -impl> Rect { +impl Rect { #[inline] - pub fn scale(&self, x: Scale, y: Scale) -> Rect { + pub fn scale(&self, x: Scale, y: Scale) -> Rect + where T: Copy + Clone + Mul { Rect { origin: Point2D { x: self.origin.x * x, y: self.origin.y * y}, size: Size2D { width: self.size.width * x, height: self.size.height * y} From 52784450ba7391b068d5f4a0b8396534232a6288 Mon Sep 17 00:00:00 2001 From: Manish Goregaokar Date: Sat, 31 Jan 2015 17:02:39 +0530 Subject: [PATCH 2/2] Silence unstable warnings --- src/lib.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lib.rs b/src/lib.rs index db27eeb..887f1bd 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -11,6 +11,7 @@ #![crate_type = "rlib"] #![feature(asm, simd)] +#![allow(unstable)] #[macro_use] extern crate log;