rust/src/test/compile-fail/box-static-bound.rs
2014-01-07 18:49:13 -08:00

13 lines
161 B
Rust

#[feature(managed_boxes)];
fn f<T>(x: T) -> @T {
@x //~ ERROR value may contain references
}
fn g<T:'static>(x: T) -> @T {
@x // ok
}
fn main() {}