Skip to main content

in_effectful_body_position

Function in_effectful_body_position 

Source
pub fn in_effectful_body_position(text: &str, offset: usize) -> bool
Expand description

#2640: whether offset sits in an effectful body, the only place a par block is legal. Lexical, like the other position cells: walk the enclosing braces outwards; the first one whose header declares a return type decides — effectful when that type is Effect[…]. A brace with no -> (an if, a match arm, a bare block) defers to the one around it.