summaryrefslogtreecommitdiffstats
path: root/tests/ui/macros/macro-attribute-expansion.rs
blob: f01e5c44a67a023b82385d0c857079d1eaed5d94 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// run-pass
macro_rules! descriptions {
    ($name:ident is $desc:expr) => {
        // Check that we will correctly expand attributes
        #[doc = $desc]
        #[allow(dead_code)]
        const $name : &'static str = $desc;
    }
}

// item
descriptions! { DOG is "an animal" }
descriptions! { RUST is "a language" }

pub fn main() {
}