]> git.lizzy.rs Git - rust.git/blobdiff - src/test/run-pass/foreach-put-structured.rs
cleanup: s/impl Copy/#[derive(Copy)]/g
[rust.git] / src / test / run-pass / foreach-put-structured.rs
index 7011088fa5d44f69582e55040a02cef3eb7b7174..029dddb7a21109734d92a3f14d05dc7f6cb0da24 100644 (file)
@@ -10,7 +10,7 @@
 
 
 
-fn pairs(it: |(int, int)|) {
+fn pairs<F>(mut it: F) where F: FnMut((int, int)) {
     let mut i: int = 0;
     let mut j: int = 0;
     while i < 10 { it((i, j)); i += 1; j += i; }
@@ -21,8 +21,8 @@ pub fn main() {
     let mut j: int = 0;
     pairs(|p| {
         let (_0, _1) = p;
-        info!("{}", _0);
-        info!("{}", _1);
+        println!("{}", _0);
+        println!("{}", _1);
         assert_eq!(_0 + 10, i);
         i += 1;
         j = _1;