You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
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() {}
|