Skip to main content

remove_unnecessary_try_catch

Function remove_unnecessary_try_catch 

Source
pub fn remove_unnecessary_try_catch(hir: &mut HIR)
Expand description

For each block with a Try terminal whose handler block is not in the blocks map, replace the terminal with a Goto to the try block.

Also cleans up the fallthrough block’s predecessors if the handler was the only path to it.