summaryrefslogtreecommitdiffstats
path: root/tests/ui/parser/issues/issue-22647.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/parser/issues/issue-22647.rs')
-rw-r--r--tests/ui/parser/issues/issue-22647.rs15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/ui/parser/issues/issue-22647.rs b/tests/ui/parser/issues/issue-22647.rs
new file mode 100644
index 000000000..a68614106
--- /dev/null
+++ b/tests/ui/parser/issues/issue-22647.rs
@@ -0,0 +1,15 @@
+fn main() {
+ let caller<F> = |f: F| //~ ERROR expected one of `:`, `;`, `=`, `@`, or `|`, found `<`
+ where F: Fn() -> i32
+ {
+ let x = f();
+ println!("Y {}",x);
+ return x;
+ };
+
+ caller(bar_handler);
+}
+
+fn bar_handler() -> i32 {
+ 5
+}