diff options
Diffstat (limited to '')
-rw-r--r-- | src/test/ui/issues/issue-3154.rs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/test/ui/issues/issue-3154.rs b/src/test/ui/issues/issue-3154.rs new file mode 100644 index 000000000..91c7203c1 --- /dev/null +++ b/src/test/ui/issues/issue-3154.rs @@ -0,0 +1,11 @@ +struct Thing<'a, Q:'a> { + x: &'a Q +} + +fn thing<'a,Q>(x: &Q) -> Thing<'a,Q> { + Thing { x: x } //~ ERROR explicit lifetime required in the type of `x` [E0621] +} + +fn main() { + thing(&()); +} |