summaryrefslogtreecommitdiffstats
path: root/tests/ui/impl-trait/issues/issue-53457.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/impl-trait/issues/issue-53457.rs')
-rw-r--r--tests/ui/impl-trait/issues/issue-53457.rs14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/ui/impl-trait/issues/issue-53457.rs b/tests/ui/impl-trait/issues/issue-53457.rs
new file mode 100644
index 000000000..7b9c2c53a
--- /dev/null
+++ b/tests/ui/impl-trait/issues/issue-53457.rs
@@ -0,0 +1,14 @@
+// check-pass
+
+#![feature(type_alias_impl_trait)]
+type X = impl Clone;
+
+fn bar<F: Fn(&i32) + Clone>(f: F) -> F {
+ f
+}
+
+fn foo() -> X {
+ bar(|_| ())
+}
+
+fn main() {}