blob: 28a5c70a02d792536880cac13f128f2a20bd93c5 [file] [log] [blame]
//@ check-pass
//@ compile-flags: -Zunpretty=expanded,hygiene
// Regression test for lifetime hygiene annotations in -Zunpretty=expanded,hygiene
// Previously, lifetimes were missing the #N syntax context suffix.
// Don't break whenever Symbol numbering changes
//@ normalize-stdout: "\d+#" -> "0#"
#![feature /* 0#0 */(decl_macro)]
#![feature /* 0#0 */(no_core)]
#![no_core /* 0#0 */]
macro lifetime_hygiene
/*
0#0
*/ {
($f:ident<$a:lifetime>) => { fn $f<$a, 'a>() {} }
}
fn f /* 0#0 */<'a /* 0#0 */, 'a /* 0#1 */>() {}
/*
Expansions:
crate0::{{expn0}}: parent: crate0::{{expn0}}, call_site_ctxt: #0, def_site_ctxt: #0, kind: Root
crate0::{{expn1}}: parent: crate0::{{expn0}}, call_site_ctxt: #0, def_site_ctxt: #0, kind: Macro(Bang, "lifetime_hygiene")
SyntaxContexts:
#0: parent: #0, outer_mark: (crate0::{{expn0}}, Opaque)
#1: parent: #0, outer_mark: (crate0::{{expn1}}, Opaque)
*/