Open shepmaster opened 8 months ago
A repro of the issue at hand:
use snafu::prelude::*;
fn make() -> Option<()> {
None
}
#[derive(Debug, Snafu)]
pub enum ReproError {
#[snafu(whatever, display("{}", message))]
Custom {
message: String,
#[snafu(source(from(Box<dyn std::error::Error + Send + Sync + 'static>, Some)))]
source: Option<Box<dyn std::error::Error + Send + Sync + 'static>>,
},
NotNative,
}
fn repro() -> Result<(), ReproError> {
make().whatever_context("bang")?;
Ok(())
}
Originally added in #395, we discovered it caused some type inference issues. In order to release 0.8 with new features, I'm reverting that code for now.