about summary refs log tree commit diff
path: root/src/test
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2014-08-21 23:10:59 +0000
committerbors <bors@rust-lang.org>2014-08-21 23:10:59 +0000
commitb43596b43ed7084aff5954e5c4bdd0b2d52665e4 (patch)
treec167d95f83895332dd3805399e95ebede9ca8e19 /src/test
parentda796ededaa04ad198c368531cf4817c36fa035d (diff)
parent7f4c5be81ad06ec51ab62de981ea2c2d4b9c0218 (diff)
downloadrust-b43596b43ed7084aff5954e5c4bdd0b2d52665e4.tar.gz
rust-b43596b43ed7084aff5954e5c4bdd0b2d52665e4.zip
auto merge of #16637 : pcwalton/rust/unboxed-closures-expected-tuple, r=pnkfelix
code wasn't considering the zero-argument case.

Closes #16168.

r? @pnkfelix
Diffstat (limited to 'src/test')
-rw-r--r--src/test/run-pass/unboxed-closures-zero-args.rs17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/test/run-pass/unboxed-closures-zero-args.rs b/src/test/run-pass/unboxed-closures-zero-args.rs
new file mode 100644
index 00000000000..6d6d81fd0ef
--- /dev/null
+++ b/src/test/run-pass/unboxed-closures-zero-args.rs
@@ -0,0 +1,17 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![feature(unboxed_closures)]
+
+fn main() {
+    let mut zero = |&mut:| {};
+    zero.call_mut(());
+}
+