fn check_nested_splice(e: &ast::Expr) -> Result<(), (Pos, String)> {
    let mut checker = NestedSpliceCheck {
        has_nested_splice: None,
    };
    visit(&mut checker, &mut (), e).unwrap();
    if let Some(p) = checker.has_nested_splice {
        return Err((p, "Splice syntax `${...}` cannot be nested.".into()));
    }
    Ok(())
}
/// Assumes that the Expr is the expression within a splice.
/// If the expression has a splice contained within, then we have
/// nested splices and this will raise an error
Assumes that the Expr is the expression within a splice.
If the expression has a splice contained within, then we have
nested splices and this will raise an error
Assumes that the Expr is the expression within a splice . If the expression has a splice contained within then we have nested splices and this will raise an error
fn check_nested_splice(e: &ast::Expr) -> Result<(), (Pos, String)> {
    let mut checker = NestedSpliceCheck {
        has_nested_splice: None,
    };
    visit(&mut checker, &mut (), e).unwrap();
    if let Some(p) = checker.has_nested_splice {
        return Err((p, "Splice syntax `${...}` cannot be nested.".into()));
    }
    Ok(())
}
fn check_nested_splice ( e : & ast :: Expr ) -> Result < ( ) , ( Pos , String ) > { let mut checker = NestedSpliceCheck { has_nested_splice : None , } ; visit ( & mut checker , & mut ( ) , e ) . unwrap ( ) ; if let Some ( p ) = checker . has_nested_splice { return Err ( ( p , " " . into ( ) ) ) ; } Ok ( ( ) ) }
Assumes that the Expr is the expression within a splice.
Assumes that the Expr is the expression within a splice .
e
&ast::Expr
e
&ast::Expr