summaryrefslogtreecommitdiffstats
path: root/src/test/ui/late-bound-lifetimes/late_bound_through_alias.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/late-bound-lifetimes/late_bound_through_alias.rs')
-rw-r--r--src/test/ui/late-bound-lifetimes/late_bound_through_alias.rs16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/test/ui/late-bound-lifetimes/late_bound_through_alias.rs b/src/test/ui/late-bound-lifetimes/late_bound_through_alias.rs
new file mode 100644
index 000000000..91839673c
--- /dev/null
+++ b/src/test/ui/late-bound-lifetimes/late_bound_through_alias.rs
@@ -0,0 +1,16 @@
+// check-pass
+
+fn f(_: X) -> X {
+ unimplemented!()
+}
+
+fn g<'a>(_: X<'a>) -> X<'a> {
+ unimplemented!()
+}
+
+type X<'a> = &'a ();
+
+fn main() {
+ let _: for<'a> fn(X<'a>) -> X<'a> = g;
+ let _: for<'a> fn(X<'a>) -> X<'a> = f;
+}