Skip to main content

cfg_if_std

Macro cfg_if_std 

Source
macro_rules! cfg_if_std {
    (if_std { $($std_item:item)* } else { $($no_std_item:item)* }) => { ... };
}
Expand description

Macro that documents what would change in a no_std build.

In std mode this expands to nothing. In a hypothetical no_std build, the $no_std_block would be active instead of $std_block.