]> git.lizzy.rs Git - rust.git/blob - src/test/ui/hygiene/duplicate_lifetimes.rs
Merge commit '0eff589afc83e21a03a168497bbab6b4dfbb4ef6' into clippyup
[rust.git] / src / test / ui / hygiene / duplicate_lifetimes.rs
1 // Ensure that lifetime parameter names are modernized before we check for
2 // duplicates.
3
4 #![feature(decl_macro, rustc_attrs)]
5
6 #[rustc_macro_transparency = "semitransparent"]
7 macro m($a:lifetime) {
8     fn g<$a, 'a>() {} //~ ERROR lifetime name `'a` declared twice
9 }
10
11 #[rustc_macro_transparency = "transparent"]
12 macro n($a:lifetime) {
13     fn h<$a, 'a>() {} //~ ERROR lifetime name `'a` declared twice
14 }
15
16 m!('a);
17 n!('a);
18
19 fn main() {}