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