pub fn determine_inherited_purity(parent: (ast::purity, ast::NodeId),
                                  child: (ast::purity, ast::NodeId),
                                  child_sigil: ast::Sigil)
                                    -> (ast::purity, ast::NodeId) {
    // If the closure is a stack closure and hasn't had some non-standard
    // purity inferred for it, then check it under its parent's purity.
    // Otherwise, use its own
    match child_sigil {
        ast::BorrowedSigil if child.first() == ast::impure_fn => parent,
        _ => child
    }
}
// Determine what purity to check a nested function under
Determine what purity to check a nested function under
Determine what purity to check a nested function under
pub fn determine_inherited_purity(parent: (ast::purity, ast::NodeId),
                                  child: (ast::purity, ast::NodeId),
                                  child_sigil: ast::Sigil)
                                    -> (ast::purity, ast::NodeId) {
    // If the closure is a stack closure and hasn't had some non-standard
    // purity inferred for it, then check it under its parent's purity.
    // Otherwise, use its own
    match child_sigil {
        ast::BorrowedSigil if child.first() == ast::impure_fn => parent,
        _ => child
    }
}
pub fn determine_inherited_purity ( parent : ( ast :: purity , ast :: NodeId ) , child : ( ast :: purity , ast :: NodeId ) , child_sigil : ast :: Sigil ) -> ( ast :: purity , ast :: NodeId ) { // If the closure is a stack closure and hasn't had some non-standard // purity inferred for it, then check it under its parent's purity. // Otherwise, use its own match child_sigil { ast :: BorrowedSigil if child . first ( ) == ast :: impure_fn => parent , _ => child } }
Determine what purity to check a nested function under
Determine what purity to check a nested function under
parent
(ast::purity, ast::NodeId)
child
(ast::purity, ast::NodeId)
child_sigil
ast::Sigil
parent
(ast::purity, ast::NodeId)
child
(ast::purity, ast::NodeId)
child_sigil
ast::Sigil