pub fn constrain_raises(
    exp: &Expected,
    raises: &Option<Expected>,
    constr: &mut ConstrBuilder
) -> TypeResult<ConstrBuilder> {
    if constr.level == 0 {
        return Ok(constr.clone());
    }

    if let Some(raises) = raises {
        constr.add("raises", &exp, raises);
        Ok(constr.clone())
    } else {
        Err(vec![TypeErr::new(&exp.pos, "Unexpected raise")])
    }
}
/// Constrain expected to raises
///
/// This indicates that the type should be contained within the set of the
/// raises constraint. Does not constrain if top-level in constr builder,
/// meaning that we do not constrain raises in top-level scripts.
Constrain expected to raises
This indicates that the type should be contained within the set of the
raises constraint. Does not constrain if top-level in constr builder,
meaning that we do not constrain raises in top-level scripts.
Constrain expected to raises This indicates that the type should be contained within the set of the raises constraint . Does not constrain if top - level in constr builder meaning that we do not constrain raises in top - level scripts .
pub fn constrain_raises(
    exp: &Expected,
    raises: &Option<Expected>,
    constr: &mut ConstrBuilder
) -> TypeResult<ConstrBuilder> {
    if constr.level == 0 {
        return Ok(constr.clone());
    }
    if let Some(raises) = raises {
        constr.add("raises", &exp, raises);
        Ok(constr.clone())
    } else {
        Err(vec![TypeErr::new(&exp.pos, "Unexpected raise")])
    }
}
pub fn constrain_raises ( exp : & Expected , raises : & Option < Expected > , constr : & mut ConstrBuilder ) -> TypeResult < ConstrBuilder > { if constr . level == 0 { return Ok ( constr . clone ( ) ) ; } if let Some ( raises ) = raises { constr . add ( " " , & exp , raises ) ; Ok ( constr . clone ( ) ) } else { Err ( vec ! [ TypeErr new ( exp pos " " ) ] ) } }
Constrain expected to raises
This indicates that the type should be contained within the set of the
raises constraint.
Constrain expected to raises This indicates that the type should be contained within the set of the raises constraint .
exp
&Expected
raises
&Option<Expected>
constr
&mut ConstrBuilder