summaryrefslogtreecommitdiffstats
path: root/third_party/rust/thiserror/tests/ui/concat-display.rs
blob: 8b53cc0cd9028cf4549fce3be58d0afeb7710540 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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() {}