fwd/vendor/thiserror/tests/ui/concat-display.rs
John Doty 9c435dc440 Vendor dependencies
Let's see how I like this workflow.
2022-12-19 08:38:22 -08:00

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