If we try to run a test binary built with -Z panic-abort-tests and that test has a function with the #[bench] attribute, the binary will panic with the following error:
thread 'main' panicked at 'Cannot run dynamic test fn out-of-process', library/test/src/lib.rs:549:22
This is because we convert #[bench] to a test using DynTestFn when not running benchmarks, but DynTestFn is not supported with -Z panic-abort-tests, because we must run tests out of process and don't have a way to pass a closure to another process.
If we try to run a test binary built with
-Z panic-abort-testsand that test has a function with the#[bench]attribute, the binary will panic with the following error:thread 'main' panicked at 'Cannot run dynamic test fn out-of-process', library/test/src/lib.rs:549:22This is because we convert
#[bench]to a test usingDynTestFnwhen not running benchmarks, butDynTestFnis not supported with-Z panic-abort-tests, because we must run tests out of process and don't have a way to pass a closure to another process.