rust/src/test/run-pass/issue-2445.rs

23 lines
242 B
Rust
Raw Normal View History

2012-09-05 19:32:05 +00:00
use dvec::DVec;
2012-06-25 20:16:47 +00:00
2012-08-16 01:46:55 +00:00
struct c1<T: copy> {
2012-06-25 20:16:47 +00:00
let x: T;
fn f1(x: T) {}
}
2012-09-05 22:58:43 +00:00
fn c1<T: copy>(x: T) -> c1<T> {
c1 {
x: x
}
}
2012-08-08 01:10:06 +00:00
impl<T: copy> c1<T> {
2012-06-25 20:16:47 +00:00
fn f2(x: T) {}
}
fn main() {
c1::<int>(3).f1(4);
c1::<int>(3).f2(4);
}