]> git.lizzy.rs Git - rust.git/blob - src/test/ui/hygiene/duplicate_lifetimes.rs
Add 'compiler/rustc_codegen_gcc/' from commit 'afae271d5d3719eeb92c18bc004bb6d1965a5f3f'
[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() {}