Address arith-overflow and error-handling in `const_eval.rs`.
1. Detect and report arithmetic overflow during const-expr eval. 2. Instead `eval_const_expr_partial` returning `Err(String)`, it now has a dedicated enum of different cases. The main benefit of this is the ability to pass along an interpretable payload, namely the two inputs that caused an overlfow. I attempted to minimize fallout to error output in tests, but some was unavoidable. Those changes are in a follow-on commit.
Showing
想要评论请 注册 或 登录