diff --git a/src/lib.rs b/src/lib.rs index e20c23c..08a9c78 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1558,12 +1558,12 @@ macro_rules! location { #[snafu(crate_root(crate))] #[snafu(whatever)] #[snafu(display("{message}"))] -#[snafu(provide(opt, ref, chain, dyn std::error::Error => source.as_deref()))] +#[snafu(provide(opt, ref, chain, dyn std::error::Error + Send + Sync => source.as_deref()))] #[cfg(any(feature = "std", test))] pub struct Whatever { - #[snafu(source(from(Box, Some)))] + #[snafu(source(from(Box, Some)))] #[snafu(provide(false))] - source: Option>, + source: Option>, message: String, backtrace: Backtrace, } diff --git a/tests/backtrace.rs b/tests/backtrace.rs index b0fa7fe..3f85718 100644 --- a/tests/backtrace.rs +++ b/tests/backtrace.rs @@ -130,7 +130,7 @@ mod whatever_nested { not_a_whatever().with_whatever_context(|_| format!("Outer failure")) } - fn not_a_whatever() -> Result<(), Box> { + fn not_a_whatever() -> Result<(), Box> { inner_whatever().map_err(Into::into) }