2012-07-31 12:27:51 -05:00
|
|
|
trait foo { fn foo(); }
|
2012-07-18 13:01:54 -05:00
|
|
|
|
|
|
|
fn to_foo<T: copy foo>(t: T) -> foo {
|
|
|
|
t as foo //~ ERROR value may contain borrowed pointers; use `owned` bound
|
|
|
|
}
|
|
|
|
|
|
|
|
fn to_foo2<T: copy foo owned>(t: T) -> foo {
|
|
|
|
t as foo
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {}
|