2012-09-05 14:32:05 -05:00
|
|
|
use dvec::DVec;
|
2012-06-25 15:16:47 -05:00
|
|
|
|
2012-09-07 16:52:28 -05:00
|
|
|
struct c1<T: Copy> {
|
2012-09-06 21:40:15 -05:00
|
|
|
x: T,
|
2012-09-07 21:04:40 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
impl<T: Copy> c1<T> {
|
2012-06-25 15:16:47 -05:00
|
|
|
fn f1(x: T) {}
|
|
|
|
}
|
|
|
|
|
2012-09-07 16:52:28 -05:00
|
|
|
fn c1<T: Copy>(x: T) -> c1<T> {
|
2012-09-05 17:58:43 -05:00
|
|
|
c1 {
|
|
|
|
x: x
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2012-09-07 16:52:28 -05:00
|
|
|
impl<T: Copy> c1<T> {
|
2012-06-25 15:16:47 -05:00
|
|
|
fn f2(x: T) {}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
c1::<int>(3).f1(4);
|
|
|
|
c1::<int>(3).f2(4);
|
|
|
|
}
|