Get cgmath building in beta by removing remaining unstable feature use. Benching is unstable and therefore only available on nightly; removed from travis in the interim.

This commit is contained in:
Ryan Stewart 2015-04-06 11:06:54 -07:00 committed by Pierre Krieger
parent e63ce6f9e2
commit a058142a2c
5 changed files with 7 additions and 5 deletions

View file

@ -22,7 +22,6 @@ env:
script:
- cargo build
- cargo test
- cargo bench
- cargo doc
after_script:
# the doc directory needs to be in the root for rust-ci

View file

@ -276,10 +276,11 @@ impl<S: BaseFloat> One for Deg<S> {
fn one() -> Deg<S> { deg(one()) }
}
const PI_2: f64 = f64::consts::PI * 2f64;
impl<S: BaseFloat>
Angle<S> for Rad<S> {
#[inline] fn from<A: Angle<S>>(theta: A) -> Rad<S> { theta.to_rad() }
#[inline] fn full_turn() -> Rad<S> { rad(cast(f64::consts::PI_2).unwrap()) }
#[inline] fn full_turn() -> Rad<S> { rad(cast(PI_2).unwrap()) }
}
impl<S: BaseFloat>

View file

@ -15,7 +15,6 @@
#![crate_type = "rlib"]
#![crate_type = "dylib"]
#![feature(plugin, core, custom_derive)]
//! Computer graphics-centric math.
//!

View file

@ -133,7 +133,6 @@ pub trait Rotation3<S: BaseNum>: Rotation<S, Vector3<S>, Point3<S>>
/// matrix:
///
/// ```no_run
/// #![feature(core)]
/// use cgmath::rad;
/// use cgmath::Vector2;
/// use cgmath::{Matrix, ToMatrix2};

View file

@ -14,6 +14,7 @@
// limitations under the License.
use std::fmt;
use std::marker::PhantomFn;
use rust_num::{zero, one};
@ -237,7 +238,10 @@ impl<S: BaseFloat + 'static> Transform3<S> for AffineMatrix3<S> {}
/// A trait that allows extracting components (rotation, translation, scale)
/// from an arbitrary transformations
pub trait ToComponents<S, V: Vector<S>, P: Point<S, V>, R: Rotation<S, V, P>> {
// PhantomFn works around a beta bug in deteriming the usage of S/P, and should be safely removed
// when PhantomFn deprecation lands in stable.
pub trait ToComponents<S: BaseNum, V: Vector<S>, P: Point<S, V>, R: Rotation<S, V, P>>
: PhantomFn<S> + PhantomFn<P> {
/// Extract the (scale, rotation, translation) triple
fn decompose(&self) -> (V, R, V);
}