rust/tests/ui/issues/issue-3154.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

12 lines
196 B
Rust
Raw Normal View History

struct Thing<'a, Q:'a> {
x: &'a Q
2012-12-07 02:32:13 +00:00
}
fn thing<'a,Q>(x: &Q) -> Thing<'a,Q> {
Thing { x: x } //~ ERROR explicit lifetime required in the type of `x` [E0621]
2012-12-07 02:32:13 +00:00
}
fn main() {
thing(&());
}