summaryrefslogtreecommitdiffstats
path: root/tests/ui/closures/self-supertrait-bounds.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/closures/self-supertrait-bounds.rs')
-rw-r--r--tests/ui/closures/self-supertrait-bounds.rs14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/ui/closures/self-supertrait-bounds.rs b/tests/ui/closures/self-supertrait-bounds.rs
new file mode 100644
index 000000000..f4f1cea6b
--- /dev/null
+++ b/tests/ui/closures/self-supertrait-bounds.rs
@@ -0,0 +1,14 @@
+// check-pass
+
+// Makes sure that we only consider `Self` supertrait predicates while
+// elaborating during closure signature deduction.
+
+#![feature(trait_alias)]
+
+trait Confusing<F> = Fn(i32) where F: Fn(u32);
+
+fn alias<T: Confusing<F>, F>(_: T, _: F) {}
+
+fn main() {
+ alias(|_| {}, |_| {});
+}