Fix compilation when the "generic_sizes" feature is enabled.
This commit is contained in:
parent
e6156727f2
commit
479cc7a7ff
|
@ -3,5 +3,5 @@ language: rust
|
||||||
script:
|
script:
|
||||||
- rustc --version
|
- rustc --version
|
||||||
- cargo --version
|
- cargo --version
|
||||||
- cargo build --verbose
|
- cargo build --verbose --features "arbitrary generic_sizes"
|
||||||
- cargo test --verbose --features arbitrary
|
- cargo test --verbose --features arbitrary
|
||||||
|
|
11
Makefile
11
Makefile
|
@ -1,16 +1,19 @@
|
||||||
tmp=_git_distcheck
|
tmp=_git_distcheck
|
||||||
|
|
||||||
all:
|
all:
|
||||||
cargo build --release --features arbitrary
|
cargo build --release --features "arbitrary generic_sizes"
|
||||||
|
|
||||||
test:
|
test:
|
||||||
cargo test
|
cargo test --features "arbitrary generic_sizes"
|
||||||
|
|
||||||
|
|
||||||
bench:
|
bench:
|
||||||
cargo bench
|
cargo bench --features "arbitrary generic_sizes"
|
||||||
|
|
||||||
|
|
||||||
doc:
|
doc:
|
||||||
cargo doc --no-deps
|
cargo doc --no-deps --features "arbitrary generic_sizes"
|
||||||
|
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
cargo clean
|
cargo clean
|
||||||
|
|
|
@ -120,4 +120,5 @@ impl<N: Arbitrary + Zero + Copy, D: 'static + ArrayLength<N>> Arbitrary for Vect
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
vecn_dvec_common_impl!(VectorN, D);
|
vecn_dvec_common_impl!(VectorN, D);
|
||||||
|
|
|
@ -163,7 +163,7 @@ macro_rules! vecn_dvec_common_impl(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<N> MulAssign<$vecn<N $(, $param)*>> for $vecn<N $(, $param)*>
|
impl<N $(, $param: ArrayLength<N>)*> MulAssign<$vecn<N $(, $param)*>> for $vecn<N $(, $param)*>
|
||||||
where N: Copy + MulAssign<N> + Zero $(, $param : ArrayLength<N>)* {
|
where N: Copy + MulAssign<N> + Zero $(, $param : ArrayLength<N>)* {
|
||||||
#[inline]
|
#[inline]
|
||||||
fn mul_assign(&mut self, right: $vecn<N $(, $param)*>) {
|
fn mul_assign(&mut self, right: $vecn<N $(, $param)*>) {
|
||||||
|
@ -175,7 +175,7 @@ macro_rules! vecn_dvec_common_impl(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<N> MulAssign<N> for $vecn<N $(, $param)*>
|
impl<N $(, $param: ArrayLength<N>)*> MulAssign<N> for $vecn<N $(, $param)*>
|
||||||
where N: Copy + MulAssign<N> + Zero $(, $param : ArrayLength<N>)* {
|
where N: Copy + MulAssign<N> + Zero $(, $param : ArrayLength<N>)* {
|
||||||
#[inline]
|
#[inline]
|
||||||
fn mul_assign(&mut self, right: N) {
|
fn mul_assign(&mut self, right: N) {
|
||||||
|
@ -185,7 +185,7 @@ macro_rules! vecn_dvec_common_impl(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<$($param : ArrayLength<N>),*> Mul<$vecn<f32 $(, $param)*>> for f32 {
|
impl<$($param : ArrayLength<f32>),*> Mul<$vecn<f32 $(, $param)*>> for f32 {
|
||||||
type Output = $vecn<f32 $(, $param)*>;
|
type Output = $vecn<f32 $(, $param)*>;
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
|
@ -200,7 +200,7 @@ macro_rules! vecn_dvec_common_impl(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<$($param : ArrayLength<N>),*> Mul<$vecn<f64 $(, $param)*>> for f64 {
|
impl<$($param : ArrayLength<f64>),*> Mul<$vecn<f64 $(, $param)*>> for f64 {
|
||||||
type Output = $vecn<f64 $(, $param)*>;
|
type Output = $vecn<f64 $(, $param)*>;
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
|
@ -253,7 +253,7 @@ macro_rules! vecn_dvec_common_impl(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<N> DivAssign<$vecn<N $(, $param)*>> for $vecn<N $(, $param)*>
|
impl<N $(, $param: ArrayLength<N>)*> DivAssign<$vecn<N $(, $param)*>> for $vecn<N $(, $param)*>
|
||||||
where N: Copy + DivAssign<N> + Zero $(, $param : ArrayLength<N>)* {
|
where N: Copy + DivAssign<N> + Zero $(, $param : ArrayLength<N>)* {
|
||||||
#[inline]
|
#[inline]
|
||||||
fn div_assign(&mut self, right: $vecn<N $(, $param)*>) {
|
fn div_assign(&mut self, right: $vecn<N $(, $param)*>) {
|
||||||
|
@ -265,7 +265,7 @@ macro_rules! vecn_dvec_common_impl(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<N> DivAssign<N> for $vecn<N $(, $param)*>
|
impl<N $(, $param: ArrayLength<N>)*> DivAssign<N> for $vecn<N $(, $param)*>
|
||||||
where N: Copy + DivAssign<N> + Zero $(, $param : ArrayLength<N>)* {
|
where N: Copy + DivAssign<N> + Zero $(, $param : ArrayLength<N>)* {
|
||||||
#[inline]
|
#[inline]
|
||||||
fn div_assign(&mut self, right: N) {
|
fn div_assign(&mut self, right: N) {
|
||||||
|
@ -313,7 +313,7 @@ macro_rules! vecn_dvec_common_impl(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<N> AddAssign<$vecn<N $(, $param)*>> for $vecn<N $(, $param)*>
|
impl<N $(, $param: ArrayLength<N>)*> AddAssign<$vecn<N $(, $param)*>> for $vecn<N $(, $param)*>
|
||||||
where N: Copy + AddAssign<N> + Zero $(, $param : ArrayLength<N>)* {
|
where N: Copy + AddAssign<N> + Zero $(, $param : ArrayLength<N>)* {
|
||||||
#[inline]
|
#[inline]
|
||||||
fn add_assign(&mut self, right: $vecn<N $(, $param)*>) {
|
fn add_assign(&mut self, right: $vecn<N $(, $param)*>) {
|
||||||
|
@ -325,7 +325,7 @@ macro_rules! vecn_dvec_common_impl(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<N> AddAssign<N> for $vecn<N $(, $param)*>
|
impl<N $(, $param: ArrayLength<N>)*> AddAssign<N> for $vecn<N $(, $param)*>
|
||||||
where N: Copy + AddAssign<N> + Zero $(, $param : ArrayLength<N>)* {
|
where N: Copy + AddAssign<N> + Zero $(, $param : ArrayLength<N>)* {
|
||||||
#[inline]
|
#[inline]
|
||||||
fn add_assign(&mut self, right: N) {
|
fn add_assign(&mut self, right: N) {
|
||||||
|
@ -403,7 +403,7 @@ macro_rules! vecn_dvec_common_impl(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<N> SubAssign<$vecn<N $(, $param)*>> for $vecn<N $(, $param)*>
|
impl<N $(, $param: ArrayLength<N>)*> SubAssign<$vecn<N $(, $param)*>> for $vecn<N $(, $param)*>
|
||||||
where N: Copy + SubAssign<N> + Zero $(, $param : ArrayLength<N>)* {
|
where N: Copy + SubAssign<N> + Zero $(, $param : ArrayLength<N>)* {
|
||||||
#[inline]
|
#[inline]
|
||||||
fn sub_assign(&mut self, right: $vecn<N $(, $param)*>) {
|
fn sub_assign(&mut self, right: $vecn<N $(, $param)*>) {
|
||||||
|
@ -415,7 +415,7 @@ macro_rules! vecn_dvec_common_impl(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<N> SubAssign<N> for $vecn<N $(, $param)*>
|
impl<N $(, $param: ArrayLength<N>)*> SubAssign<N> for $vecn<N $(, $param)*>
|
||||||
where N: Copy + SubAssign<N> + Zero $(, $param : ArrayLength<N>)* {
|
where N: Copy + SubAssign<N> + Zero $(, $param : ArrayLength<N>)* {
|
||||||
#[inline]
|
#[inline]
|
||||||
fn sub_assign(&mut self, right: N) {
|
fn sub_assign(&mut self, right: N) {
|
||||||
|
|
Loading…
Reference in New Issue