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;
///
/// 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;