diff options
Diffstat (limited to 'src/test/ui/for-loop-while/foreach-simple-outer-slot.rs')
-rw-r--r-- | src/test/ui/for-loop-while/foreach-simple-outer-slot.rs | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/src/test/ui/for-loop-while/foreach-simple-outer-slot.rs b/src/test/ui/for-loop-while/foreach-simple-outer-slot.rs deleted file mode 100644 index a8d42a789..000000000 --- a/src/test/ui/for-loop-while/foreach-simple-outer-slot.rs +++ /dev/null @@ -1,16 +0,0 @@ -// run-pass - - - -pub fn main() { - let mut sum: isize = 0; - first_ten(|i| { println!("main"); println!("{}", i); sum = sum + i; }); - println!("sum"); - println!("{}", sum); - assert_eq!(sum, 45); -} - -fn first_ten<F>(mut it: F) where F: FnMut(isize) { - let mut i: isize = 0; - while i < 10 { println!("first_ten"); it(i); i = i + 1; } -} |