summaryrefslogtreecommitdiffstats
path: root/tests/ui/regions/regions-in-structs-anon.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/regions/regions-in-structs-anon.rs')
-rw-r--r--tests/ui/regions/regions-in-structs-anon.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/ui/regions/regions-in-structs-anon.rs b/tests/ui/regions/regions-in-structs-anon.rs
new file mode 100644
index 000000000..7cb2ce0db
--- /dev/null
+++ b/tests/ui/regions/regions-in-structs-anon.rs
@@ -0,0 +1,7 @@
+// Test that anonymous lifetimes are not permitted in struct declarations
+
+struct Foo {
+ x: &isize //~ ERROR missing lifetime specifier
+}
+
+fn main() {}