summaryrefslogtreecommitdiffstats
path: root/src/test/ui/functions-closures/fn-bare-coerce-to-block.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/functions-closures/fn-bare-coerce-to-block.rs')
-rw-r--r--src/test/ui/functions-closures/fn-bare-coerce-to-block.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/test/ui/functions-closures/fn-bare-coerce-to-block.rs b/src/test/ui/functions-closures/fn-bare-coerce-to-block.rs
new file mode 100644
index 000000000..922e016dd
--- /dev/null
+++ b/src/test/ui/functions-closures/fn-bare-coerce-to-block.rs
@@ -0,0 +1,10 @@
+// run-pass
+// pretty-expanded FIXME #23616
+
+fn bare() {}
+
+fn likes_block<F>(f: F) where F: FnOnce() { f() }
+
+pub fn main() {
+ likes_block(bare);
+}