Skip to main content

const_for

Macro const_for 

Source
macro_rules! const_for {
    ($var:pat_param in ($range:expr).step_by($step:expr) => $body:stmt) => { ... };
    ($var:pat_param in ($range:expr).rev().step_by($step:expr) => $body:stmt) => { ... };
    ($var:pat_param in ($range:expr).rev() => $body:stmt) => { ... };
    ($var:pat_param in ($range:expr).step_by($step:expr).rev() => $body:stmt) => { ... };
    ($var:pat_param in $range:expr => $body:stmt) => { ... };
}
Expand description

A for loop that is usable in const contexts.

See the crate-level documentation for more information.