We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 33b7461 commit d02f166Copy full SHA for d02f166
src/lib.rs
@@ -438,10 +438,12 @@ fn clamp_test() {
438
439
#[test]
440
fn clamp_nan_bound() {
441
- /// When debug assertions are enabled, checks that the expression panics.
+ /// When debug assertions and the `std` feature are enabled, checks that
442
+ /// the expression panics.
443
macro_rules! assert_debug_panics {
444
($body:expr) => {
- if cfg!(debug_assertions) {
445
+ #[cfg(all(debug_assertions, feature = "std"))]
446
+ {
447
if let Ok(v) = ::std::panic::catch_unwind(|| $body) {
448
panic!(
449
"assertion failed: should_panic; non-panicking result: {:?}",
0 commit comments