rust/src/test/ui/proc-macro/input-interpolated.stdout
Aaron Hill a67d248b13
Properly encode spans with a dummy location and non-root SyntaxContext
Previously, we would throw away the `SyntaxContext` of any span with a
dummy location during metadata encoding. This commit makes metadata Span
encoding consistent with incr-cache Span encoding - an 'invalid span'
tag is only used when it doesn't lose any information.
2020-09-12 23:26:17 -04:00

77 lines
1.6 KiB
Text

PRINT-BANG INPUT (DISPLAY): A
PRINT-BANG INPUT (DEBUG): TokenStream [
Group {
delimiter: None,
stream: TokenStream [
Ident {
ident: "A",
span: #0 bytes(503..504),
},
],
span: #4 bytes(370..372),
},
]
PRINT-ATTR INPUT (DISPLAY): const A : u8 = 0 ;
PRINT-ATTR INPUT (DEBUG): TokenStream [
Ident {
ident: "const",
span: #4 bytes(416..421),
},
Group {
delimiter: None,
stream: TokenStream [
Ident {
ident: "A",
span: #0 bytes(503..504),
},
],
span: #4 bytes(422..424),
},
Punct {
ch: ':',
spacing: Alone,
span: #4 bytes(424..425),
},
Ident {
ident: "u8",
span: #4 bytes(426..428),
},
Punct {
ch: '=',
spacing: Alone,
span: #4 bytes(429..430),
},
Literal {
kind: Integer,
symbol: "0",
suffix: None,
span: #4 bytes(431..432),
},
Punct {
ch: ';',
spacing: Alone,
span: #4 bytes(432..433),
},
]
PRINT-DERIVE INPUT (DISPLAY): struct A { }
PRINT-DERIVE INPUT (DEBUG): TokenStream [
Ident {
ident: "struct",
span: #4 bytes(468..474),
},
Group {
delimiter: None,
stream: TokenStream [
Ident {
ident: "A",
span: #0 bytes(503..504),
},
],
span: #4 bytes(475..477),
},
Group {
delimiter: Brace,
stream: TokenStream [],
span: #4 bytes(478..480),
},
]