error-stack: concrete type trait satisfaction issues with thiserror
#1866
-
For various reasons I'm using Given this example: use std::fmt::Display;
use error_stack::{Context, Report};
#[derive(Debug)]
pub struct DbError;
impl Display for DbError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "database error")
}
}
impl Context for DbError {}
#[derive(Debug, thiserror::Error)]
pub enum Error {
#[error(transparent)]
DbError(Report<DbError>),
}
fn main() {} Results in the compilation error below claiming that
Scratching my head as to why this issue comes across with concrete types. Substituting #[derive(Debug, thiserror::Error)]
pub enum Error<C> {
#[error(transparent)]
DbError(Report<C>),
} |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Issue should be resolved with the use of this PR: More context here |
Beta Was this translation helpful? Give feedback.
Issue should be resolved with the use of this PR:
#1746
More context here