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

23 lines
239 B
Rust
Raw Normal View History

2012-08-15 18:46:55 -07:00
struct c1<T: copy> {
2012-06-25 13:16:47 -07:00
let x: T;
fn f1(x: int) {
}
}
2012-09-05 15:58:43 -07:00
fn c1<T: copy>(x: T) -> c1<T> {
c1 {
x: x
}
}
2012-08-07 18:10:06 -07:00
impl<T: copy> c1<T> {
2012-06-25 13:16:47 -07:00
fn f2(x: int) {
}
}
fn main() {
c1::<int>(3).f1(4);
c1::<int>(3).f2(4);
}