2014-10-16 14:40:21 -05:00
|
|
|
trait MatrixShape {}
|
|
|
|
|
|
|
|
struct Col<D, C> {
|
|
|
|
data: D,
|
|
|
|
col: C,
|
|
|
|
}
|
|
|
|
|
2015-01-08 05:02:42 -06:00
|
|
|
trait Collection { fn len(&self) -> usize; }
|
2014-10-30 15:43:24 -05:00
|
|
|
|
2015-01-08 05:02:42 -06:00
|
|
|
impl<T, M: MatrixShape> Collection for Col<M, usize> {
|
2015-01-05 14:56:07 -06:00
|
|
|
//~^ ERROR type parameter `T` is not constrained
|
2015-01-08 05:02:42 -06:00
|
|
|
fn len(&self) -> usize {
|
2014-10-16 14:40:21 -05:00
|
|
|
unimplemented!()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {}
|