summaryrefslogtreecommitdiffstats
path: root/src/test/ui/bounds-lifetime.rs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/test/ui/bounds-lifetime.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/test/ui/bounds-lifetime.rs b/src/test/ui/bounds-lifetime.rs
new file mode 100644
index 000000000..31aa4011b
--- /dev/null
+++ b/src/test/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() {}