about summary refs log tree commit diff
path: root/tests/ui/iterators/fold-iterator-error-23966.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/iterators/fold-iterator-error-23966.rs')
-rw-r--r--tests/ui/iterators/fold-iterator-error-23966.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/ui/iterators/fold-iterator-error-23966.rs b/tests/ui/iterators/fold-iterator-error-23966.rs
new file mode 100644
index 00000000000..970c943da0b
--- /dev/null
+++ b/tests/ui/iterators/fold-iterator-error-23966.rs
@@ -0,0 +1,5 @@
+// https://github.com/rust-lang/rust/issues/23966
+fn main() {
+    "".chars().fold(|_, _| (), ());
+    //~^ ERROR E0277
+}