mirror of
https://git.proxmox.com/git/rustc
synced 2025-08-26 05:49:15 +00:00
16 lines
293 B
Rust
16 lines
293 B
Rust
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() {}
|