1 2 3 4 5 6 7 8 9 10
use crate::ir::Node; #[inline] pub(crate) fn reachable_prefix(nodes: &[Node]) -> &[Node] { let end = nodes .iter() .position(|node| matches!(node, Node::Return)) .map_or(nodes.len(), |index| index + 1); &nodes[..end] }