summaryrefslogtreecommitdiffstats
path: root/src/test/ui/variance/variance-regions-unused-indirect.rs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/test/ui/variance/variance-regions-unused-indirect.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/test/ui/variance/variance-regions-unused-indirect.rs b/src/test/ui/variance/variance-regions-unused-indirect.rs
new file mode 100644
index 000000000..1514e3956
--- /dev/null
+++ b/src/test/ui/variance/variance-regions-unused-indirect.rs
@@ -0,0 +1,11 @@
+// Test that disallow lifetime parameters that are unused.
+
+enum Foo<'a> { //~ ERROR parameter `'a` is never used
+ Foo1(Bar<'a>)
+}
+
+enum Bar<'a> { //~ ERROR parameter `'a` is never used
+ Bar1(Foo<'a>)
+}
+
+fn main() {}