about summary refs log tree commit diff
path: root/tests/ui/explicit-tail-calls/higher-ranked-arg.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/explicit-tail-calls/higher-ranked-arg.rs')
-rw-r--r--tests/ui/explicit-tail-calls/higher-ranked-arg.rs13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/ui/explicit-tail-calls/higher-ranked-arg.rs b/tests/ui/explicit-tail-calls/higher-ranked-arg.rs
new file mode 100644
index 00000000000..e60686ab511
--- /dev/null
+++ b/tests/ui/explicit-tail-calls/higher-ranked-arg.rs
@@ -0,0 +1,13 @@
+// Regression test for <https://github.com/rust-lang/rust/issues/144826>.
+//@ check-pass
+
+#![feature(explicit_tail_calls)]
+#![expect(incomplete_features)]
+
+fn foo(x: fn(&i32)) {
+    become bar(x);
+}
+
+fn bar(_: fn(&i32)) {}
+
+fn main() {}