rust/src/test/compile-fail/issue-3154.rs

11 lines
161 B
Rust
Raw Normal View History

2012-12-06 20:32:13 -06:00
struct thing<Q> {
x: &Q
}
fn thing<Q>(x: &Q) -> thing<Q> {
thing{ x: x } //~ ERROR cannot infer an appropriate lifetime
}
fn main() {
thing(&());
}