summaryrefslogtreecommitdiffstats
path: root/tests/ui/bounds-lifetime.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/bounds-lifetime.rs')
-rw-r--r--tests/ui/bounds-lifetime.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/ui/bounds-lifetime.rs b/tests/ui/bounds-lifetime.rs
new file mode 100644
index 000000000..31aa4011b
--- /dev/null
+++ b/tests/ui/bounds-lifetime.rs
@@ -0,0 +1,7 @@
+type A = for<'b, 'a: 'b> fn(); //~ ERROR lifetime bounds cannot be used in this context
+type B = for<'b, 'a: 'b,> fn(); //~ ERROR lifetime bounds cannot be used in this context
+type C = for<'b, 'a: 'b +> fn(); //~ ERROR lifetime bounds cannot be used in this context
+type D = for<'a, T> fn(); //~ ERROR only lifetime parameters can be used in this context
+type E = dyn for<T> Fn(); //~ ERROR only lifetime parameters can be used in this context
+
+fn main() {}