onkoe / pisserror

A golden replacement for `thiserror`.
https://crates.io/crates/pisserror
MIT License
0 stars 0 forks source link

allow from variants to skip the error attr's message #15

Closed onkoe closed 2 months ago

onkoe commented 3 months ago

in other words, make this valid:

use pisserror::Error;
use std::error::Error;

#[derive(Debug, Error)]
enum MyError {
    #[error]
    VariantWithFromField(#[from] std::io::Error),
    #[error("message has to be here: {_0}")]
    NormalVariant(i32),
}
onkoe commented 2 months ago

nope. let's do #17