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

26 lines
262 B
Rust
Raw Normal View History

struct c1<T: Copy> {
2012-09-06 19:40:15 -07:00
x: T,
}
impl<T: Copy> c1<T> {
2012-06-25 13:16:47 -07:00
fn f1(x: int) {
}
}
fn c1<T: Copy>(x: T) -> c1<T> {
2012-09-05 15:58:43 -07:00
c1 {
x: x
}
}
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);
}