Skip to content

Commit 27bfe38

Browse files
committed
Workaround internal compiler error
The associated type bound here was not parsed correctly. This is likely due to the ICE described in rust-lang/rust#20413.
1 parent 39fd7c1 commit 27bfe38

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/lib.rs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ extern crate quickcheck;
9898
extern crate test;
9999

100100
use std::cmp;
101-
use std::ops::Neg;
101+
use std::ops::{Neg, Mul};
102102
pub use traits::{
103103
Absolute,
104104
AbsoluteRotate,
@@ -608,7 +608,12 @@ pub fn append_rotation_wrt_center<LV: Neg<Output = LV> + Copy,
608608

609609
/// Builds a rotation matrix from `r`.
610610
#[inline(always)]
611-
pub fn to_rot_mat<N, LV, AV, R: RotationMatrix<N, LV, AV>>(r: &R) -> R::Output {
611+
pub fn to_rot_mat<N, LV, AV, R, M>(r: &R) -> M
612+
where R: RotationMatrix<N, LV, AV, Output=M>,
613+
M: Mat<N, LV, AV> + Rotation<AV> + Col<LV> + Copy,
614+
LV: Mul<M, Output=LV> + Copy,
615+
{
616+
// FIXME: rust-lang/rust#20413
612617
r.to_rot_mat()
613618
}
614619

0 commit comments

Comments
 (0)