rust-lang / miri

An interpreter for Rust's mid-level intermediate representation
Apache License 2.0
4.13k stars 318 forks source link

Use strict_{add,sub,...} instead of checked_{add,sub,...}.unwrap() #3668

Closed RalfJung closed 1 week ago

RalfJung commented 2 weeks ago

The standard library now contains functions for "strict" arithmetic, where overflow is guaranteed to panic. We should use that to replace all the checked_add(...).unwrap() etc in the Miri codebase, hopefully making the code a bit more readable.