thiserror/tests/ui/concat-display.rs
2020-10-17 10:37:43 -07:00

13 lines
238 B
Rust

use thiserror::Error;
macro_rules! error_type {
($name:ident, $what:expr) => {
#[derive(Error, Debug)]
#[error(concat!("invalid ", $what))]
pub struct $name;
};
}
error_type!(Error, "foo");
fn main() {}