[][src]Macro uint::unroll

macro_rules! unroll {
    (for $v:ident in 0..0 $c:block) => { ... };
    (for $v:ident < $max:tt in ($start:tt..$end:tt).step_by($val:expr) {$($c:tt)*}) => { ... };
    (for $v:ident in ($start:tt..$end:tt).step_by($val:expr) {$($c:tt)*}) => { ... };
    (for $v:ident in ($start:tt..$end:tt) {$($c:tt)*}) => { ... };
    (for $v:ident in $start:tt..$end:tt {$($c:tt)*}) => { ... };
    (for $v:ident < $max:tt in $start:tt..$end:tt $c:block) => { ... };
    (for $v:ident in 0..$end:tt {$($statement:tt)*}) => { ... };
    (@$v:ident, $a:expr, 0, $c:block) => { ... };
    (@$v:ident, $a:expr, 1, $c:block) => { ... };
    (@$v:ident, $a:expr, 2, $c:block) => { ... };
    (@$v:ident, $a:expr, 3, $c:block) => { ... };
    (@$v:ident, $a:expr, 4, $c:block) => { ... };
    (@$v:ident, $a:expr, 5, $c:block) => { ... };
    (@$v:ident, $a:expr, 6, $c:block) => { ... };
    (@$v:ident, $a:expr, 7, $c:block) => { ... };
    (@$v:ident, $a:expr, 8, $c:block) => { ... };
    (@$v:ident, $a:expr, 9, $c:block) => { ... };
    (@$v:ident, $a:expr, 10, $c:block) => { ... };
    (@$v:ident, $a:expr, 11, $c:block) => { ... };
    (@$v:ident, $a:expr, 12, $c:block) => { ... };
    (@$v:ident, $a:expr, 13, $c:block) => { ... };
    (@$v:ident, $a:expr, 14, $c:block) => { ... };
    (@$v:ident, $a:expr, 15, $c:block) => { ... };
    (@$v:ident, $a:expr, 16, $c:block) => { ... };
    (@$v:ident, $a:expr, 17, $c:block) => { ... };
    (@$v:ident, $a:expr, 18, $c:block) => { ... };
    (@$v:ident, $a:expr, 19, $c:block) => { ... };
    (@$v:ident, $a:expr, 20, $c:block) => { ... };
    (@$v:ident, $a:expr, 21, $c:block) => { ... };
    (@$v:ident, $a:expr, 22, $c:block) => { ... };
    (@$v:ident, $a:expr, 23, $c:block) => { ... };
    (@$v:ident, $a:expr, 24, $c:block) => { ... };
    (@$v:ident, $a:expr, 25, $c:block) => { ... };
    (@$v:ident, $a:expr, 26, $c:block) => { ... };
    (@$v:ident, $a:expr, 27, $c:block) => { ... };
    (@$v:ident, $a:expr, 28, $c:block) => { ... };
    (@$v:ident, $a:expr, 29, $c:block) => { ... };
    (@$v:ident, $a:expr, 30, $c:block) => { ... };
    (@$v:ident, $a:expr, 31, $c:block) => { ... };
    (@$v:ident, $a:expr, 32, $c:block) => { ... };
    (@$v:ident, $a:expr, 33, $c:block) => { ... };
    (@$v:ident, $a:expr, 34, $c:block) => { ... };
    (@$v:ident, $a:expr, 35, $c:block) => { ... };
    (@$v:ident, $a:expr, 36, $c:block) => { ... };
    (@$v:ident, $a:expr, 37, $c:block) => { ... };
    (@$v:ident, $a:expr, 38, $c:block) => { ... };
    (@$v:ident, $a:expr, 39, $c:block) => { ... };
    (@$v:ident, $a:expr, 40, $c:block) => { ... };
    (@$v:ident, $a:expr, 41, $c:block) => { ... };
    (@$v:ident, $a:expr, 42, $c:block) => { ... };
    (@$v:ident, $a:expr, 43, $c:block) => { ... };
    (@$v:ident, $a:expr, 44, $c:block) => { ... };
    (@$v:ident, $a:expr, 45, $c:block) => { ... };
    (@$v:ident, $a:expr, 46, $c:block) => { ... };
    (@$v:ident, $a:expr, 47, $c:block) => { ... };
    (@$v:ident, $a:expr, 48, $c:block) => { ... };
    (@$v:ident, $a:expr, 49, $c:block) => { ... };
    (@$v:ident, $a:expr, 50, $c:block) => { ... };
    (@$v:ident, $a:expr, 51, $c:block) => { ... };
    (@$v:ident, $a:expr, 52, $c:block) => { ... };
    (@$v:ident, $a:expr, 53, $c:block) => { ... };
    (@$v:ident, $a:expr, 54, $c:block) => { ... };
    (@$v:ident, $a:expr, 55, $c:block) => { ... };
    (@$v:ident, $a:expr, 56, $c:block) => { ... };
    (@$v:ident, $a:expr, 57, $c:block) => { ... };
    (@$v:ident, $a:expr, 58, $c:block) => { ... };
    (@$v:ident, $a:expr, 59, $c:block) => { ... };
    (@$v:ident, $a:expr, 60, $c:block) => { ... };
    (@$v:ident, $a:expr, 61, $c:block) => { ... };
    (@$v:ident, $a:expr, 62, $c:block) => { ... };
    (@$v:ident, $a:expr, 63, $c:block) => { ... };
    (@$v:ident, $a:expr, 64, $c:block) => { ... };
}

Unroll the given for loop

Example:

This example is not tested
unroll! {
  for i in 0..5 {
    println!("Iteration {}", i);
  }
}

will expand into:

This example is not tested
{ println!("Iteration {}", 0); }
{ println!("Iteration {}", 1); }
{ println!("Iteration {}", 2); }
{ println!("Iteration {}", 3); }
{ println!("Iteration {}", 4); }