I need to turn off overflow checks in unit tests. I can use command line to accomplish this using cargo test --release
, however:
- GUI test buttons provided by rust-analyzer provide a better experience, however they're configured to run on debug mode with overflow checks on.
cargo test --release
hidesprintln!
statements, but I would like to see them.
CodePudding user response:
Just disable overflow checking for tests in your Cargo.toml file:
[profile.test]
overflow-checks = false