2019-07-28 12:33:51 +00:00
|
|
|
// Ensure that lifetime parameter names are modernized before we check for
|
|
|
|
// duplicates.
|
|
|
|
|
|
|
|
#![feature(decl_macro, rustc_attrs)]
|
|
|
|
|
|
|
|
#[rustc_macro_transparency = "semitransparent"]
|
|
|
|
macro m($a:lifetime) {
|
2022-06-02 18:46:40 +00:00
|
|
|
fn g<$a, 'a>() {} //~ ERROR the name `'a` is already used for a generic parameter
|
2019-07-28 12:33:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#[rustc_macro_transparency = "transparent"]
|
|
|
|
macro n($a:lifetime) {
|
2022-06-02 18:46:40 +00:00
|
|
|
fn h<$a, 'a>() {} //~ ERROR the name `'a` is already used for a generic parameter
|
2019-07-28 12:33:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
m!('a);
|
|
|
|
n!('a);
|
|
|
|
|
|
|
|
fn main() {}
|