]> git.lizzy.rs Git - rust.git/blob - tests/ui/macros/macro-attribute-expansion.rs
Rollup merge of #107127 - uweigand:s390x-sanitizer, r=Mark-Simulacrum
[rust.git] / tests / ui / macros / macro-attribute-expansion.rs
1 // run-pass
2 macro_rules! descriptions {
3     ($name:ident is $desc:expr) => {
4         // Check that we will correctly expand attributes
5         #[doc = $desc]
6         #[allow(dead_code)]
7         const $name : &'static str = $desc;
8     }
9 }
10
11 // item
12 descriptions! { DOG is "an animal" }
13 descriptions! { RUST is "a language" }
14
15 pub fn main() {
16 }