summaryrefslogtreecommitdiffstats
path: root/tests/ui/moves/move-nullary-fn.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/moves/move-nullary-fn.rs')
-rw-r--r--tests/ui/moves/move-nullary-fn.rs13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/ui/moves/move-nullary-fn.rs b/tests/ui/moves/move-nullary-fn.rs
new file mode 100644
index 000000000..14c9262c7
--- /dev/null
+++ b/tests/ui/moves/move-nullary-fn.rs
@@ -0,0 +1,13 @@
+// run-pass
+// Issue #922
+// pretty-expanded FIXME #23616
+
+fn f2<F>(_thing: F) where F: FnOnce() { }
+
+fn f<F>(thing: F) where F: FnOnce() {
+ f2(thing);
+}
+
+pub fn main() {
+ f(|| {});
+}