1 PRINT-BANG INPUT (DISPLAY): struct S;
2 PRINT-BANG RE-COLLECTED (DISPLAY): struct S ;
3 PRINT-BANG INPUT (DEBUG): TokenStream [
9 span: $DIR/nonterminal-token-hygiene.rs:30:5: 30:11 (#5),
13 span: $DIR/nonterminal-token-hygiene.rs:30:12: 30:13 (#5),
18 span: $DIR/nonterminal-token-hygiene.rs:30:13: 30:14 (#5),
21 span: $DIR/nonterminal-token-hygiene.rs:20:27: 20:32 (#6),
24 #![feature /* 0#0 */(prelude_import)]
26 // Make sure that marks from declarative macros are applied to tokens in nonterminal.
29 // compile-flags: -Z span-debug -Z macro-backtrace -Z unpretty=expanded,hygiene
30 // compile-flags: -Z trim-diagnostic-paths=no
31 // normalize-stdout-test "\d+#" -> "0#"
32 // aux-build:test-macros.rs
34 #![feature /* 0#0 */(decl_macro)]
37 #[prelude_import /* 0#1 */]
38 use ::core /* 0#1 */::prelude /* 0#1 */::rust_2015 /* 0#1 */::*;
39 #[macro_use /* 0#1 */]
40 extern crate core /* 0#2 */;
41 #[macro_use /* 0#1 */]
42 extern crate compiler_builtins /* 0#2 */;
43 // Don't load unnecessary hygiene information from std
44 extern crate std /* 0#0 */;
46 #[macro_use /* 0#0 */]
47 extern crate test_macros /* 0#0 */;
55 macro inner() { print_bang ! { $ item } } inner ! () ;
61 macro inner /* 0#4 */ { () => { print_bang ! { struct S; } } }
64 // OK, not a duplicate definition of `S`
66 fn main /* 0#0 */() { }
70 0: parent: ExpnId(0), call_site_ctxt: #0, def_site_ctxt: #0, kind: Root
71 1: parent: ExpnId(0), call_site_ctxt: #0, def_site_ctxt: #0, kind: AstPass(StdImports)
72 2: parent: ExpnId(0), call_site_ctxt: #0, def_site_ctxt: #0, kind: Macro(Bang, "outer")
73 3: parent: ExpnId(0), call_site_ctxt: #0, def_site_ctxt: #0, kind: AstPass(StdImports)
74 4: parent: ExpnId(2), call_site_ctxt: #4, def_site_ctxt: #4, kind: Macro(Bang, "inner")
75 5: parent: ExpnId(4), call_site_ctxt: #6, def_site_ctxt: #0, kind: Macro(Bang, "print_bang")
78 #0: parent: #0, outer_mark: (ExpnId(0), Opaque)
79 #1: parent: #0, outer_mark: (ExpnId(1), Opaque)
80 #2: parent: #0, outer_mark: (ExpnId(1), Transparent)
81 #3: parent: #0, outer_mark: (ExpnId(3), Opaque)
82 #4: parent: #0, outer_mark: (ExpnId(2), SemiTransparent)
83 #5: parent: #0, outer_mark: (ExpnId(4), Opaque)
84 #6: parent: #4, outer_mark: (ExpnId(4), Opaque)
85 #7: parent: #0, outer_mark: (ExpnId(5), Opaque)
86 #8: parent: #6, outer_mark: (ExpnId(5), Transparent)
87 #9: parent: #5, outer_mark: (ExpnId(5), SemiTransparent)