3 // compile-flags: -Zmir-opt-level=3
5 trait IterExt: Iterator {
6 fn fold_ex<B, F>(mut self, init: B, mut f: F) -> B
9 F: FnMut(B, Self::Item) -> B,
12 while let Some(x) = self.next() {
19 impl<T: Iterator> IterExt for T {}
23 test.iter().fold_ex(String::new(), |_, b| b.to_string());