diff --git a/libs/error-stack/src/sink.rs b/libs/error-stack/src/sink.rs index b4bb6921485..2d6754f6e68 100644 --- a/libs/error-stack/src/sink.rs +++ b/libs/error-stack/src/sink.rs @@ -52,8 +52,14 @@ impl Drop for Bomb { match self.0 { BombState::Panic => panic!("ReportSink was dropped without being consumed"), + #[cfg(feature = "tracing")] + BombState::Warn => { + tracing::warn!("ReportSink was dropped without being consumed"); + } + #[cfg(not(feature = "tracing"))] #[allow(clippy::print_stderr)] BombState::Warn => { + #[cfg(not(target_arch = "wasm32"))] eprintln!("ReportSink was dropped without being consumed"); } BombState::Defused => {}