summaryrefslogtreecommitdiffstats
path: root/src/test/ui/lifetimes/elided-lifetime-in-path-in-impl-Fn.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/lifetimes/elided-lifetime-in-path-in-impl-Fn.rs')
-rw-r--r--src/test/ui/lifetimes/elided-lifetime-in-path-in-impl-Fn.rs19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/test/ui/lifetimes/elided-lifetime-in-path-in-impl-Fn.rs b/src/test/ui/lifetimes/elided-lifetime-in-path-in-impl-Fn.rs
new file mode 100644
index 000000000..9c9965d8f
--- /dev/null
+++ b/src/test/ui/lifetimes/elided-lifetime-in-path-in-impl-Fn.rs
@@ -0,0 +1,19 @@
+// check-pass
+
+struct Foo<'a>(&'a ());
+
+fn with_fn() -> fn(Foo) {
+ |_| ()
+}
+
+fn with_impl_fn() -> impl Fn(Foo) {
+ |_| ()
+}
+
+fn with_where_fn<T>()
+where
+ T: Fn(Foo),
+{
+}
+
+fn main() {}