1Def site: $DIR/auxiliary/make-macro.rs:7:9: 7:56 (#5)
2Input: TokenStream [Ident { ident: "$crate", span: $DIR/meta-macro-hygiene.rs:24:37: 24:43 (#4) }, Punct { ch: ':', spacing: Joint, span: $DIR/meta-macro-hygiene.rs:24:43: 24:45 (#4) }, Punct { ch: ':', spacing: Alone, span: $DIR/meta-macro-hygiene.rs:24:43: 24:45 (#4) }, Ident { ident: "dummy", span: $DIR/meta-macro-hygiene.rs:24:45: 24:50 (#4) }, Punct { ch: '!', spacing: Alone, span: $DIR/meta-macro-hygiene.rs:24:50: 24:51 (#4) }, Group { delimiter: Parenthesis, stream: TokenStream [], span: $DIR/meta-macro-hygiene.rs:24:51: 24:53 (#4) }]
3Respanned: TokenStream [Ident { ident: "$crate", span: $DIR/auxiliary/make-macro.rs:7:9: 7:56 (#5) }, Punct { ch: ':', spacing: Joint, span: $DIR/auxiliary/make-macro.rs:7:9: 7:56 (#5) }, Punct { ch: ':', spacing: Alone, span: $DIR/auxiliary/make-macro.rs:7:9: 7:56 (#5) }, Ident { ident: "dummy", span: $DIR/auxiliary/make-macro.rs:7:9: 7:56 (#5) }, Punct { ch: '!', spacing: Alone, span: $DIR/auxiliary/make-macro.rs:7:9: 7:56 (#5) }, Group { delimiter: Parenthesis, stream: TokenStream [], span: $DIR/auxiliary/make-macro.rs:7:9: 7:56 (#5) }]
4#![feature /* 0#0 */(prelude_import)]
5// aux-build:make-macro.rs
6// aux-build:meta-macro.rs
7// edition:2018
8// compile-flags: -Z span-debug -Z macro-backtrace -Z unpretty=expanded,hygiene -Z trim-diagnostic-paths=no
9// check-pass
10// normalize-stdout-test "\d+#" -> "0#"
11// normalize-stdout-test "expn\d{3,}" -> "expnNNN"
12//
13// We don't care about symbol ids, so we set them all to 0
14// in the stdout
15
16#![no_std /* 0#0 */]
17#[prelude_import /* 0#1 */]
18use core /* 0#1 */::prelude /* 0#1 */::rust_2018 /* 0#1 */::*;
19#[macro_use /* 0#1 */]
20extern crate core /* 0#1 */;
21#[macro_use /* 0#1 */]
22extern crate compiler_builtins /* 0#1 */;
23// Don't load unnecessary hygiene information from std
24extern crate std /* 0#0 */;
25
26extern crate meta_macro /* 0#0 */;
27
28macro_rules! produce_it
29    /*
30    0#0
31    */ {
32    () =>
33    {
34        meta_macro :: print_def_site! ($crate :: dummy! ()) ;
35        // `print_def_site!` will respan the `$crate` identifier
36        // with `Span::def_site()`. This should cause it to resolve
37        // relative to `meta_macro`, *not* `make_macro` (despite
38        // the fact that that `print_def_site` is produced by
39        // a `macro_rules!` macro in `make_macro`).
40    }
41}
42
43fn main /* 0#0 */() { ; }
44
45/*
46Expansions:
47crate0::{{expn0}}: parent: crate0::{{expn0}}, call_site_ctxt: #0, def_site_ctxt: #0, kind: Root
48crate0::{{expn1}}: parent: crate0::{{expn0}}, call_site_ctxt: #0, def_site_ctxt: #0, kind: AstPass(StdImports)
49crate0::{{expn2}}: parent: crate0::{{expn0}}, call_site_ctxt: #0, def_site_ctxt: #0, kind: Macro(Bang, "produce_it")
50crate0::{{expn3}}: parent: crate0::{{expn2}}, call_site_ctxt: #4, def_site_ctxt: #0, kind: Macro(Bang, "meta_macro::print_def_site")
51crate0::{{expn4}}: parent: crate0::{{expn3}}, call_site_ctxt: #5, def_site_ctxt: #0, kind: Macro(Bang, "$crate::dummy")
52crate1::{{expnNNN}}: parent: crate0::{{expn0}}, call_site_ctxt: #0, def_site_ctxt: #0, kind: Macro(Attr, "derive")
53crate1::{{expnNNN}}: parent: crate0::{{expn0}}, call_site_ctxt: #0, def_site_ctxt: #0, kind: Macro(Attr, "derive")
54crate1::{{expnNNN}}: parent: crate0::{{expn0}}, call_site_ctxt: #0, def_site_ctxt: #0, kind: Macro(Bang, "include")
55crate2::{{expn1}}: parent: crate0::{{expn0}}, call_site_ctxt: #0, def_site_ctxt: #0, kind: AstPass(StdImports)
56
57SyntaxContexts:
58#0: parent: #0, outer_mark: (crate0::{{expn0}}, Opaque)
59#1: parent: #0, outer_mark: (crate0::{{expn1}}, Opaque)
60#2: parent: #0, outer_mark: (crate0::{{expn1}}, Transparent)
61#3: parent: #0, outer_mark: (crate2::{{expn1}}, Opaque)
62#4: parent: #0, outer_mark: (crate0::{{expn2}}, SemiTransparent)
63#5: parent: #0, outer_mark: (crate0::{{expn3}}, Opaque)
64#6: parent: #4, outer_mark: (crate0::{{expn3}}, Transparent)
65#7: parent: #0, outer_mark: (crate0::{{expn3}}, SemiTransparent)
66#8: parent: #0, outer_mark: (crate0::{{expn4}}, Opaque)
67#9: parent: #5, outer_mark: (crate0::{{expn4}}, Transparent)
68#10: parent: #5, outer_mark: (crate0::{{expn4}}, SemiTransparent)
69*/
70