summaryrefslogtreecommitdiffstats
path: root/tests/ui/issues/issue-3154.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/issues/issue-3154.rs')
-rw-r--r--tests/ui/issues/issue-3154.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/ui/issues/issue-3154.rs b/tests/ui/issues/issue-3154.rs
new file mode 100644
index 000000000..91c7203c1
--- /dev/null
+++ b/tests/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(&());
+}