Skip to main content

valid_target_expr

Function valid_target_expr 

Source
fn valid_target_expr(
    ctx: &AssistContext<'_, '_>,
) -> impl Fn(SyntaxNode) -> Option<Expr>
Expand description

Check whether the node is a valid expression which can be extracted to a variable. In general that’s true for any expression, but in some cases that would produce invalid code.