summaryrefslogtreecommitdiffstats
path: root/tests/ui/higher-rank-trait-bounds/fn-ptr.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/higher-rank-trait-bounds/fn-ptr.rs')
-rw-r--r--tests/ui/higher-rank-trait-bounds/fn-ptr.rs14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/ui/higher-rank-trait-bounds/fn-ptr.rs b/tests/ui/higher-rank-trait-bounds/fn-ptr.rs
new file mode 100644
index 000000000..853160f96
--- /dev/null
+++ b/tests/ui/higher-rank-trait-bounds/fn-ptr.rs
@@ -0,0 +1,14 @@
+// revisions: classic next
+//[next] compile-flags: -Ztrait-solver=next
+//[next] check-pass
+
+fn ice()
+where
+ for<'w> fn(&'w ()): Fn(&'w ()),
+{
+}
+
+fn main() {
+ ice();
+ //[classic]~^ ERROR expected a `Fn<(&'w (),)>` closure, found `fn(&'w ())`
+}