summaryrefslogtreecommitdiffstats
path: root/tests/ui/error-codes/E0261.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/error-codes/E0261.rs')
-rw-r--r--tests/ui/error-codes/E0261.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/ui/error-codes/E0261.rs b/tests/ui/error-codes/E0261.rs
new file mode 100644
index 000000000..f05e09aa0
--- /dev/null
+++ b/tests/ui/error-codes/E0261.rs
@@ -0,0 +1,9 @@
+fn foo(x: &'a str) { } //~ ERROR E0261
+ //~| undeclared lifetime
+
+struct Foo {
+ x: &'a str, //~ ERROR E0261
+ //~| undeclared lifetime
+}
+
+fn main() {}