3 ms·
I wonder if there is a simple way to stop compilation quickly, with a readable error message, if the optimizer isn't able to eliminate the check. edit: There i
by Yoric 2y ago
I wonder if there is a simple way to stop compilation quickly, with a readable error message, if the optimizer isn't able to eliminate the check.
edit: There is https://github.com/dtolnay/no-panic https://github.com/dtolnay/no-panic
- vlovich123 2y ago> Functions that require some amount of optimization to prove that they do not panic may no longer compile in debug mode after being marked #[no_panic]. So you’re probably going to have to protect this with a cfg_attr to only apply the no_panic in release only.
- Yoric 2y agoProbably, yes. That or forcing compilation to always target release.