rust/src/test/run-pass/issue-2311-2.rs

16 lines
191 B
Rust
Raw Normal View History

trait clam<A: copy> { }
2012-08-15 18:46:55 -07:00
struct foo<A: copy> {
2012-09-06 19:40:15 -07:00
x: A,
2012-07-13 13:03:21 -07:00
fn bar<B,C:clam<A>>(c: C) -> B {
fail;
}
}
2012-09-05 15:58:43 -07:00
fn foo<A: copy>(b: A) -> foo<A> {
foo {
x: b
}
}
2012-07-13 13:03:21 -07:00
fn main() { }