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

11 lines
161 B
Rust
Raw Normal View History

2012-12-06 18:32:13 -08: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(&());
}