Function naga::proc::ensure_block_returns[][src]

pub fn ensure_block_returns(block: &mut Block)

Ensure that the given block has return statements at the end of its control flow.

Note: we don't want to blindly append a return statement to the end, because it may be either redundant or invalid, e.g. when the user already has returns in if/else branches.