Skip to main content

shape_error

Function shape_error 

Source
pub fn shape_error(
    expected: &dyn Shape,
    cx: &mut Cx,
    expr: &Expr,
) -> Result<Error>
Expand description

Build the WrongShape error an expression produces against an expected shape.

Re-runs the check and packages the rejection diagnostics into an Error::WrongShape. Returns a HostError instead if the expression is in fact accepted, since there is no error to report in that case.