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

11 lines
140 B
Rust
Raw Normal View History

fn f<T>(x: T) -> @T {
@x //~ ERROR value may contain borrowed pointers
}
fn g<T:'static>(x: T) -> @T {
@x // ok
}
fn main() {}