forked from M-Labs/nalgebra
Make the alloc feature actually work.
This commit is contained in:
parent
05e053a310
commit
d759db682c
@ -22,6 +22,7 @@ arbitrary = [ "quickcheck" ]
|
||||
serde-serialize = [ "serde", "serde_derive", "num-complex/serde" ]
|
||||
abomonation-serialize = [ "abomonation" ]
|
||||
debug = [ ]
|
||||
alloc = [ ]
|
||||
|
||||
[dependencies]
|
||||
typenum = "1.10"
|
||||
|
@ -8,6 +8,9 @@ use std::mem;
|
||||
use std::ops::Mul;
|
||||
use std::ptr;
|
||||
|
||||
#[cfg(all(feature = "alloc", not(feature = "std")))]
|
||||
use alloc::Vec;
|
||||
|
||||
use generic_array::ArrayLength;
|
||||
use typenum::Prod;
|
||||
|
||||
|
@ -1,3 +1,6 @@
|
||||
#[cfg(all(feature = "alloc", not(feature = "std")))]
|
||||
use alloc::Vec;
|
||||
|
||||
use num::{One, Zero};
|
||||
|
||||
use alga::general::{
|
||||
|
@ -1,5 +1,8 @@
|
||||
use std::ops::Deref;
|
||||
|
||||
#[cfg(all(feature = "alloc", not(feature = "std")))]
|
||||
use alloc::Vec;
|
||||
|
||||
use base::allocator::Allocator;
|
||||
use base::default_allocator::DefaultAllocator;
|
||||
use base::dimension::{Dim, DimName, Dynamic, U1};
|
||||
|
@ -85,6 +85,7 @@ an optimized set of tools for computer graphics and physics. Those features incl
|
||||
#![warn(incoherent_fundamental_impls)]
|
||||
#![doc(html_root_url = "http://nalgebra.org/rustdoc")]
|
||||
#![cfg_attr(not(feature = "std"), no_std)]
|
||||
#![cfg_attr(all(feature = "alloc", not(feature = "std")), feature(alloc))]
|
||||
|
||||
#[cfg(feature = "arbitrary")]
|
||||
extern crate quickcheck;
|
||||
@ -113,6 +114,9 @@ extern crate typenum;
|
||||
|
||||
extern crate alga;
|
||||
|
||||
#[cfg(all(feature = "alloc", not(feature = "std")))]
|
||||
extern crate alloc;
|
||||
|
||||
#[cfg(not(feature = "std"))]
|
||||
extern crate core as std;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user