fparkan/vendor/thiserror/tests/ui/concat-display.rs
Valentin Popov 1b6a04ca55
Initial vendor packages
Signed-off-by: Valentin Popov <valentin@popov.link>
2024-01-08 01:21:28 +04:00

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() {}