enable overflow checks in the standard library

This commit is contained in:
Ralf Jung 2020-11-07 15:56:25 +01:00
parent 30e0c303a0
commit 330ec0acdb

View File

@ -354,7 +354,8 @@ fn setup(subcommand: MiriCommand) {
command.env_remove("RUSTC_WRAPPER");
command.env_remove("RUSTFLAGS");
// Disable debug assertions in the standard library -- Miri is already slow enough.
command.env("RUSTFLAGS", "-Cdebug-assertions=off");
// But keep the overflow checks, they are cheap.
command.env("RUSTFLAGS", "-Cdebug-assertions=off -Coverflow-checks=on");
// Finally run it!
if command.status().expect("failed to run xargo").success().not() {
show_error(format!("failed to run xargo"));