about summary refs log tree commit diff
path: root/src/libgetopts
diff options
context:
space:
mode:
Diffstat (limited to 'src/libgetopts')
-rw-r--r--src/libgetopts/lib.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/libgetopts/lib.rs b/src/libgetopts/lib.rs
index a47fab124c3..79c435f01e4 100644
--- a/src/libgetopts/lib.rs
+++ b/src/libgetopts/lib.rs
@@ -87,6 +87,7 @@
        html_playground_url = "http://play.rust-lang.org/")]
 #![feature(globs, phase)]
 #![feature(import_shadowing)]
+#![feature(unboxed_closures)]
 #![deny(missing_docs)]
 
 #[cfg(test)] #[phase(plugin, link)] extern crate log;
@@ -867,8 +868,9 @@ impl Copy for LengthLimit {}
 ///
 /// Panics during iteration if the string contains a non-whitespace
 /// sequence longer than the limit.
-fn each_split_within<'a>(ss: &'a str, lim: uint, it: |&'a str| -> bool)
-                     -> bool {
+fn each_split_within<F>(ss: &str, lim: uint, mut it: F) -> bool where
+    F: FnMut(&str) -> bool
+{
     // Just for fun, let's write this as a state machine:
 
     let mut slice_start = 0;