blob: 8b53cc0cd9028cf4549fce3be58d0afeb7710540 [file] [log] [blame]
use thiserror::Error;
macro_rules! error_type {
($name:ident, $what:expr) => {
// Use #[error("invalid {}", $what)] instead.
#[derive(Error, Debug)]
#[error(concat!("invalid ", $what))]
pub struct $name;
};
}
error_type!(Error, "foo");
fn main() {}