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