Replies: 1 comment 1 reply
-
fn is_error<E: std::error::Error>() {}
fn main() { is_error::<Box<dyn std::error::Error>>() }
I don't understand the distinction that you are making. Can you give an example of how this other type would be used or be implemented, and how |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
In the docs I often see:
#[snafu(source(from(Box<dyn std::error::Error + Send + Sync>, Box))], but that's a metric ton of typing, so was hoping to use a type alias. It mostly works, but sometimes Snafu seems to dislike it. E.g.:BTW. Would it be possible for snafu to come with some "Boxed error" built-in error, that would just to the right thing? Like
Whatevererror, but not just stringly-based, but type-erased-error one.Beta Was this translation helpful? Give feedback.
All reactions