From 70b4def5cce610d5c85acac16b3a081781c6a259 Mon Sep 17 00:00:00 2001 From: Eduard Bopp Date: Sun, 29 Mar 2015 13:20:52 +0200 Subject: [PATCH 1/3] Stop using unstable std_misc feature It was only used for `Float::{max_value, min_value}` in non-necessary places, so for now this helps stabilization for Rust 1.0. --- src/lib.rs | 1 - src/traits/structure.rs | 29 ++++++++++++++--------------- 2 files changed, 14 insertions(+), 16 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 20938215..4a4bf5ef 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -84,7 +84,6 @@ Feel free to add your project to this list if you happen to use **nalgebra**! #![warn(missing_docs)] #![feature(unboxed_closures)] #![feature(core)] -#![feature(std_misc)] #![feature(test)] #![doc(html_root_url = "http://nalgebra.org/doc")] diff --git a/src/traits/structure.rs b/src/traits/structure.rs index 24918616..93b0b4dd 100644 --- a/src/traits/structure.rs +++ b/src/traits/structure.rs @@ -1,8 +1,7 @@ //! Traits giving structural informations on linear algebra objects or the space they live in. -use std::f32; -use std::f64; -use std::num::{Int, Float}; +use std::{f32, f64, i8, i16, i32, i64, u8, u16, u32, u64, isize, usize}; +use std::num::Float; use std::slice::{Iter, IterMut}; use std::ops::{Add, Sub, Mul, Div, Neg, Rem, Index, IndexMut}; use traits::operations::{RMul, LMul, Axpy, Transpose, Inv, Absolute}; @@ -363,18 +362,18 @@ macro_rules! impl_bounded( } ); -impl_bounded!(f32, Float::min_value(), Float::max_value()); -impl_bounded!(f64, Float::min_value(), Float::max_value()); -impl_bounded!(i8, Int::min_value(), Int::max_value()); -impl_bounded!(i16, Int::min_value(), Int::max_value()); -impl_bounded!(i32, Int::min_value(), Int::max_value()); -impl_bounded!(i64, Int::min_value(), Int::max_value()); -impl_bounded!(isize, Int::min_value(), Int::max_value()); -impl_bounded!(u8, Int::min_value(), Int::max_value()); -impl_bounded!(u16, Int::min_value(), Int::max_value()); -impl_bounded!(u32, Int::min_value(), Int::max_value()); -impl_bounded!(u64, Int::min_value(), Int::max_value()); -impl_bounded!(usize, Int::min_value(), Int::max_value()); +impl_bounded!(f32, f32::MIN, f32::MAX); +impl_bounded!(f64, f64::MIN, f64::MAX); +impl_bounded!(i8, i8::MIN, i8::MAX); +impl_bounded!(i16, i16::MIN, i16::MAX); +impl_bounded!(i32, i32::MIN, i32::MAX); +impl_bounded!(i64, i64::MIN, i64::MAX); +impl_bounded!(isize, isize::MIN, isize::MAX); +impl_bounded!(u8, u8::MIN, u8::MAX); +impl_bounded!(u16, u16::MIN, u16::MAX); +impl_bounded!(u32, u32::MIN, u32::MAX); +impl_bounded!(u64, u64::MIN, u64::MAX); +impl_bounded!(usize, usize::MIN, usize::MAX); // BaseFloat From de2351a441d986f60c28310365adbdeb1d48bbe9 Mon Sep 17 00:00:00 2001 From: Eduard Bopp Date: Sun, 29 Mar 2015 13:21:56 +0200 Subject: [PATCH 2/3] Only use test feature in test configuration --- src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index 4a4bf5ef..f6ab409c 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -84,7 +84,7 @@ Feel free to add your project to this list if you happen to use **nalgebra**! #![warn(missing_docs)] #![feature(unboxed_closures)] #![feature(core)] -#![feature(test)] +#![cfg_attr(test, feature(test))] #![doc(html_root_url = "http://nalgebra.org/doc")] extern crate rustc_serialize; From ef4a52d53bb7490a498b8ba039734a32469e629e Mon Sep 17 00:00:00 2001 From: Eduard Bopp Date: Sun, 29 Mar 2015 13:44:28 +0200 Subject: [PATCH 3/3] Remove unused feature unboxed_closures --- src/lib.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index f6ab409c..1b269153 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -82,7 +82,6 @@ Feel free to add your project to this list if you happen to use **nalgebra**! #![deny(unused_qualifications)] #![deny(unused_results)] #![warn(missing_docs)] -#![feature(unboxed_closures)] #![feature(core)] #![cfg_attr(test, feature(test))] #![doc(html_root_url = "http://nalgebra.org/doc")]