rust/src/test/compile-fail/box-static-bound.rs

13 lines
168 B
Rust
Raw Normal View History

2013-10-23 04:49:18 -04:00
#[feature(managed_boxes)];
fn f<T>(x: T) -> @T {
@x //~ ERROR value may contain borrowed pointers
}
fn g<T:'static>(x: T) -> @T {
@x // ok
}
fn main() {}